Java QR Code Generator by Aspose.BarCode for Java

QR Code Generator by Aspose.BarCode for Java is a web application to generate various types of QR Codes using Aspose.BarCode for Java.

Aspose.BarCode for Java is a robust and reliable barcode generation and recognition component, written in Java. It allows developers to quickly and easily add barcode generation and recognition functionality to their Java applications. It is available for the Java SE, Java EE and Java ME platforms.

This application highlights commonly used features of Aspose.BarCode for Java and demonstrates how to utilize them to generate various types of QR Codes including Text, Url, Email, Phone number, Contact (VCard), Event, Geolocation, Wifi and SMS.

Java QR Code Generator

QR Code Generator – Highlights

  • Spring MVC 4.0 RESTFul API based web application for QR Code generation using Aspose.BarCode for Java library
  • Mobile friendly responsive and flat UI using Bootstrap 3+ , RequireJS, Backbone.js on top of restful APIs
  • Generate various types of (scan-able) QR Codes using Aspose.BarCode for Java
    • URL
    • Text
    • Vcard
    • SMS
    • Phone
    • Event
    • Wifi
    • Geolocation
    • Encrypted Text
  • Supports various QR Code customizations including
    • Resizing
    • Selection of Level of Reed-Solomon error correction. From low to high: LevelL, LevelM, LevelQ, LevelH
    • Foreground and Background color selection
  • Save the generated QR Code in different image formats (Bmp, Gif, Jpeg, Png, Tiff)
  • Generate encrypted QR Code from Plain Text using password-based encryption (PBE)- PBEWITHMD5AND128BITAES-CBC-OPENSSL with OpenSSL compatibility

Steps To Generate QR Code

  1. Select the QR Code Type
  2. Input Type Context
  3. Customize QR Code Settings
  4. Generate/Preview QR Code
  5. Save QR Code
Generate QR Code in Java

Export/Save Generated QR Code

You can export the generated QR Code into any of the following formats.

  • PNG
  • JPEG
  • GIF
  • TIFF
  • BMP

Embed Anywhere

The application also supports embedding generated QR Codes into any website of your choice using a direct URL. Here are the steps.

Steps To Generate Embed QR Code

  1. Select the QR Code Type
  2. Input Type Context
  3. Customize QR Code Settings
  4. Generate/Preview QR Code
  5. Copy QR Code Save URL
  6. Change URL query string ‘download’ to false.
  7. That’s it. URL is now ready to embed as an image.
<img width="100%" src="https://localhost:8080/qrcodegen/api/qrcode/generate?data=http://aspose.com&ecc=L&foreColor=%23000000&bgColor=%23FFFFFF&download=false&format=png">

API Documentation

The application also exports its Restful APIs documentation using swagger specification. You can also view the application APIs swagger based documentation by accessing the following URL after running the project.

http://localhost:8080/qrcodegen/public/docs/

Create QR in Java

Clone Repository

$ git clone https://github.com/AsposeShowcase/QR_Code_Generator_by_Aspose.BarCode_for_Java.git

If this is your first time using Github, review http://help.github.com to learn the basics.

Run QR Code Generator

From the command line with Maven:

$ cd QR_Code_Generator_by_Aspose.BarCode_for_Java
$ mvn jetty:run

From IDE such as NetBeans IDE, Eclipse, IDEA or others:

Note: Set the application context path to ‘qrcodegen’ (if required).

Access the deployed application at: http://localhost:8080/qrcodegen/

Aspose License

The project works without a license, with limitations. To remove limitations, you can acquire a free temporary license or buy a full license.

How to Apply License

Simply change license.file property value to the path to your Aspose license file in the project configuration src/main/resources/config.properties.

license.file=C:\\aspose\\Aspose.Total.Java.lic

Technologies

The project uses a number of open-source projects to work properly:

Download the Source Code

Complete source code of QR Code Generator by Aspose.BarCode for Java is available on your favorite site.