Java QR Code Generator Data Encoding Tutorial
sample source code to input valid data and generate 2D QR Code images in Java
- Easily generate high quality QR Code images on any operating system with a JVM
- Servlets, Applets, JavaBean and class library are provided in QR Code generator for Java
- Permanent license with the purchase of the developer license
- Generate barcodes which can be added to Oracle Reports and Crystal Reports
- Compatible with JDK 1.4 or greater
- Servlets are compatible with all browsers, easy to embed in HTML as an image with the tag and can be used to add server-side barcode generator capability to a dedicated Web server
- Applets may be used to easily display barcodes in Web pages with compatible Web browsers
- Valid character set and available data length can be referred in the QR Code page
- Encoding QR Code valid data set to generate valid QR Code images in Java applications
As a Java 2D barcode generation component, QR Code generator in java provides full solution on QR Code size setting, image setting as following.
Java QR Code size setting properties implementation such as X, Y, barcodeHeight, barcodeWidth, etc can be found here;
Java QR Code image setting properties implementation such as backColor, foreColor, resolution, ets can be fonud here.
Java QR Code Basic Information
Java QR Code generator is a mature and reliable Java barcode generation component for creating QR Code barcodes in Java, Jasper Reports, iReport, and Eclipse BIRT projects. High-quality QR Code barcode images can be drawn and printed into GIF, BMP, PNG, JPEG/JPG & TIFF formats with Java QR Code barcode generator. Rich barcode options are provided to customize QR Code barcode properties in accordance with your needs.
QR Code Overview
QR CodeQR Code, also known as Denso Barcode, QRCode, Quick Response Code, is a very popular, two-dimensional (2D) barcode symbology, was first developed by Deso Wave Corporation in 1994 for manufacturing, and quickly became popular because of its fast readability and large storage capacity. It is made up of a square area with a white background and black modules in it. Any type of data information can be encoded, such as characters, numbers and text.
Valid Data Set to Encode QR Code in Java
- Numeric Letters: 0 - 9;
- Alphanumeric Data: degits from 0 - 9; uppercase letters from A - Z; special letters(space, $ % * + - . / :);
- Byte Data: default is ISO/IEC 8859-1;
- Kanji Characters.
Valid Data Length in Java
Java QR Code is a famous 2D barcode type for Java Barcode Generator which can encode variable data length to generate high quality QR Code images with Java applications.
Java QR Code Data Encoding Details
Encode Only Numeric Data for Java QR Code
QRCode barcode = new QRCode();
barcode.setData("7878787878");
Encode Only Alphanumeric Letters for Java QR Code
QRCode barcode = new QRCode();
barcode.setData("JAVA-1234");
Encode Only Byte Digits for Java QR Code
QRCode barcode = new QRCode();
barcode.setData(":/.+");
Encode Only Kanji Digits for Java QR Code
Java QR Code generator allows encoding Kanji characters. Please see SJIS (Shift JIS encoding): from ~9ddddd (Shift JIS 0x8140 ~ 0x9FFC and 0xE040 ~ 0xEBBF)
QRCode barcode = new QRCode();
barcode.setData("~937727");
//Set the processTilde property to true, if you want use the tilde character "~" to specify special
characters in the input data. Default is true.
barcode.setprocessTild(true);
Encode Vriable Data Length for Java QR Code
For QR Code storage capability in Java, here is a list for all kings of data type maximum encoding data length.
- Alphanumeric Data: 4,296 characters
- Numeric Data: 7,089 characters
- Byte Data: 2,953 characters
- Kanji Character: 1,817 characters