J4L-Micro QRCode for the Java[TM] platform

Copyright J4L Components (http://www.java4less.com) 2012.

Introduction

The package J4L-Micro QRCode contains the classes you need to create Micro QRCode barcodes within your jsp or java applications.

The Micro QR Code format (also specified in this International Standard), is a variant of QR Code with a reduced number of overhead modules and a restricted range of sizes. A single finder pattern, is located at the upper left corner of the symbol as illustrated in the following figure.

Micro QR Code symbols have 4 version (version 1 to 4). The sizes of the barcodes are:

The maximum barcode capacity of Micro QR Code the largest barcode symbol size, (Version 4  error correction level L):

Supports 4 error correction levels:

Installation and requirements

In order to install the software you just need to unzip the ZIP file in an empty directory (your must unzip with pathname so that the subdirectories are properly created.

 

Examples

In order to run the sample application you must execute runDEMO.bat. The sample application requires JDK 1.3 or later. 

 

 

In the sample application you can set all properties of the Micro QRCode symbology.

You can execute the following commands:

 

The Servlet

Micro QRCode comes with a standard servlet (com.java4less.microqrcode.QRCodeServlet) you can use to create Micro QRCode images. The parameters for the servlet can be sent using GET or POST commands. The parameters are:

For example, if you want to test the servlet using Tomcat 4.1 you must do the following:

  1. copy the qrcode.jar to /tomcat/webapps/examples/Web-inf/lib
  2. Start the server and test the servlet entering the following address and parameters in your browser:

    http://localhost:8080/examples/servlet/MicroQRCodeServlet?DATA=ABC&ENCODING=NORMAL

In order to property print a barcode created with the servlet you must use the <IMG> tag. In this way you can embed the image in your HTML page. Note that you will need to use the attibutes height and width in order to achieve the correct size of the barcode on the printed page.

This is a simple HTML page that contains a qrcode symbol:

<HTML>
<HEAD>

<TITLE>Servlet Example META http-equiv=Content-Type content="text/html; charset=windows-1252">

</HEAD>
<BODY bgColor=#ffffff>

This is your Barcode:
<IMG height=100 width=100 src="http://localhost:8080/examples/servlet/MicroQRCodeServlet?DATA=TEST" >

</BODY>
</HTML>

The Applet

You must add the following code in your html pages to use the applet:

 

<APPLET
CODEBASE = "./"
CODE = "com.java4less.microqrcode.QRCodeApplet.class"
ARCHIVE = "microqrcode.jar"
NAME = "TestApplet"
WIDTH = 300
HEIGHT = 250
HSPACE = 0
VSPACE = 0
ALIGN = middle
>

<PARAM NAME = "DATA" VALUE = "123411">

</APPLET>

Note that the microqrcode.jar file must be located in the directory referenced by the CODEBASE parameter.

The available paramete are the same as those used by the servlet (see description in the previous section):

 

Annex A

Table — Data capacity for Micro QRCode versions

 

Version
Error Correction Level

Numeric

Alphanumeric

Byte

Kanji

1

 

5

-

-

-

2

L
M

10
8

6
5

-

-

3

L
M

23
18

14
11

9
7

6
4

4

L
M
Q

35
30
21

 

21
18
13

 

15
13
9

 

9
8
5