com.pdfjet
Class QRCode

java.lang.Object
  extended by com.pdfjet.QRCode
All Implemented Interfaces:
Drawable

public class QRCode
extends java.lang.Object
implements Drawable

Used to create 2D QR Code barcodes. Please see Example_20.


Constructor Summary
QRCode(java.lang.String str, int errorCorrectLevel)
          Used to create 2D QR Code barcodes.
 
Method Summary
 float[] drawOn(Page page)
          Draws this barcode on the specified page.
 java.lang.Boolean[][] getData()
           
 void setLocation(float x, float y)
          Sets the location where this barcode will be drawn on the page.
 void setModuleLength(double moduleLength)
          Sets the module length of this barcode.
 void setModuleLength(float moduleLength)
          Sets the module length of this barcode.
 void setPosition(double x, double y)
          Sets the position where this barcode will be drawn on the page.
 void setPosition(float x, float y)
          Sets the position where this barcode will be drawn on the page.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QRCode

public QRCode(java.lang.String str,
              int errorCorrectLevel)
       throws java.io.UnsupportedEncodingException
Used to create 2D QR Code barcodes.

Parameters:
str - the string to encode.
errorCorrectLevel - the desired error correction level.
Throws:
java.io.UnsupportedEncodingException
Method Detail

setPosition

public void setPosition(double x,
                        double y)
Sets the position where this barcode will be drawn on the page.

Parameters:
x - the x coordinate of the top left corner of the barcode.
y - the y coordinate of the top left corner of the barcode.

setPosition

public void setPosition(float x,
                        float y)
Sets the position where this barcode will be drawn on the page.

Parameters:
x - the x coordinate of the top left corner of the barcode.
y - the y coordinate of the top left corner of the barcode.

setLocation

public void setLocation(float x,
                        float y)
Sets the location where this barcode will be drawn on the page.

Parameters:
x - the x coordinate of the top left corner of the barcode.
y - the y coordinate of the top left corner of the barcode.

setModuleLength

public void setModuleLength(double moduleLength)
Sets the module length of this barcode. The default value is 2.0f

Parameters:
moduleLength - the specified module length.

setModuleLength

public void setModuleLength(float moduleLength)
Sets the module length of this barcode. The default value is 2.0f

Parameters:
moduleLength - the specified module length.

drawOn

public float[] drawOn(Page page)
               throws java.lang.Exception
Draws this barcode on the specified page.

Specified by:
drawOn in interface Drawable
Parameters:
page - the specified page.
Returns:
x and y coordinates of the bottom right corner of this component.
Throws:
java.lang.Exception

getData

public java.lang.Boolean[][] getData()