createMaxiCode

Navigation:  Tutorials > iReport > ImageFactory Class > Methods >

createMaxiCode

Previous pageReturn to chapter overviewNext page

Returns an Image object containing a MaxiCode barcode.

public static Image createMaxiCode(String data, int rotation, int resolution, String country, String serviceClass,

                                                     String zipCode, int mode, boolean handleTilde, String imageFormat)

Parameters

data

Specifies a string which will be encoded by MaxiCode barcode.

 

rotation

Specifies the orientation of the barcode, a valid value should be 0, 1,  2, or 3. Please refer to Orientation Constants

 

resolution

Specifies the resolution (DPI) of a device onto which a barcode will be rendered. The default value is 96 for computer screen.

 

country

Specifies the country code of MaxiCode barcode.

 

serviceClass

Specifies the service class of MaxiCode barcode.

 

zipCode

Specifies the zip code of MaxiCode barcode.

 

mode

Specifies the encoding mode for Maxicode barcode, a valid value should be between 2 and 5. Please refer to Mode Constants.

 

handleTilde

Specifies a boolean flag indicating whether or not it is required to process the tilde character "~". If it is set to TRUE, non-printable characters can be passed to a barcode using the tilde character, "~dNNN" represents an ASCII character encoded by the 3 digits NNN, for example, "~d010" represents the character LF (line feed).

 

imageFormat

Specifies barcode image format, it can be "bmp", "jpg", or "png".