Java QR Code Generator Library SDK Integration & Developer Guide
Generate barcode QR Code images in Java class, Servlet, JSP, J2EE with complete sample Java source code
- Generate, create QR Code in Java applications
- Fully support GS1 QR Code for GS1 data message encoding
- Easy to install & integrate 2d barcode QR Code generation library SDK into Java developments
- Generate over 30 linear, 2d barcode images in Java including
Java Data Matrix,
Java PDF-417,
Java Interleaved 2/5,
Java Code 39,
Java Code 128
- Generate QR Code images in Java class, Java Bean, Swing, Applet, J2SE
- Create barcode QR Code in Java web application, including Servlet, JSP, EJB, Tomcat, JBoss, J2EE
- Create & Print QR Code barcode in BIRT reports designer and BIRT report runtime
- Generate & Draw QR Code in Jasper Reports, iReport
- Encode QR Code images to jpeg, eps, gif, png, tiff, bitmap files in Java program
Index
Java QR Code Generator Introduction
QR Code, also known as Denso Barcode, QRCode, Quick Response Code, is a kind of 2D (two dimensional) barcode widely used today.
Generate and create QR Code barcode using Java is one of the functions in OnBarcode's
Barcode for Java Generating Java library (jar file), which supports
generating & printing QR Code and 20+ other linear & 2D bar codes in Java application and software.
QR Code Generator and Reader library, SDK & application
QR Code Generator components and software include
QR Code .NET,
QR Code C#,
QR Code VB.NET,
QR Code ASP.NET,
QR Code iPhone,
QR Code iPad,
QR Code Android,
QR Code Generator.
This document is providing a detailed Java sample source code about generating QR Code barcodes in Java class using
Java Barcode generation component.
Complete QR Code custmoization settings is included in
Java QR Code generating guide.
Generate QR Code Barcodes in Java
Generating QR Code barcode in Java class example:
QRCode barcode = new QRCode();
/*
QR Code Valid data char set:
numeric data (digits 0 - 9);
alphanumeric data (digits 0 - 9; upper case letters A -Z; nine other characters: space, $ % * + - . / : );
byte data (default: ISO/IEC 8859-1);
Kanji characters
*/
barcode.setData("http://www.onbarcode.com");
barcode.setDataMode(QRCode.M_AUTO);
barcode.setVersion(10);
barcode.setEcl(QRCode.ECL_M);
// Set the processTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is false.
// 1-byte character: ~ddd (character value from 0 ~ 255)
// ASCII (with EXT): from ~000 to ~255
// 2-byte character: ~6ddddd (character value from 0 ~ 65535)
// Unicode: from ~600000 to ~665535
// ECI: from ~7000000 to ~7999999
// SJIS: from ~9ddddd (Shift JIS 0x8140 ~ 0x9FFC and 0xE040 ~ 0xEBBF)
barcode.setProcessTilde(false);
// QR Code unit of measure for X, Y, LeftMargin, RightMargin, TopMargin, BottomMargin
barcode.setUom(IBarcode.UOM_PIXEL);
// QR Code barcode module width in pixel
barcode.setX(3f);
barcode.setLeftMargin(10f);
barcode.setRightMargin(10f);
barcode.setTopMargin(10f);
barcode.setBottomMargin(10f);
// barcode image resolution in dpi
barcode.setResolution(72);
barcode.drawBarcode("C:\\qrcode.gif");
Java Barcode Generation Demo Source Codes: