The dFontQR Java class

The dFontQR Java class may be used to return strings that contain rows of characters that, when displayed in the AZT font form a QR Code symbol. The class may be used directly or through the dFontQR.jar provided.

The class is instantiated with the new command:

dFontQR qr1=new dFontQR();

and the required properties set using the setCodeType(), setModeType() and setLevel() methods. The data is supplied to the class using the setCaption() methods and the update) method called to generated the barcode characters.

The number of rows of characters in the resulting barcode may be obtained from the getNStrings() method, and each line of the barcode returned using getBarcodeString(i), eg.

//g is output graphics – screen or printer
// ht is the chose font height in points
//x and y are the top left coordinated required for the symbol
n=qr1.getNStrings();
for (i=0; i<n; i++)
{ g.drawString(qr1.getBarcodeString(i),x,(y+i*ht)); }

 

Details of the properties and methods implemented in the java class are given in the Common Java class Features section

 

 

More:

The QR Code UFL for Crystal Reports