Set Height of the Bars in the Barcode Image

Contents
[ ]
todo:image_alt_text
Figure: A barcode with different bar heights

Graphics Unit To change the measuring unit of the bar height, use any of the following:

Measuring Units Description
setDocument() Specifies the document unit (1/300 inch) as the unit of measure
setInches() Specifies the inch as the unit of measure
setMillimeters() Specifies the millimeter as the unit of measure
setPixels() Specifies a device pixel as the unit of measure
setPoints() Specifies a printer’s point (1/72 inch) as the unit of measure
The image below shows the output from the code in this example.
todo:image_alt_text
Figure: The output barcode image

In two dimensional barcodes, set getxDimension() decides each module’s width.

xDimension = 6
todo:image_alt_text
The following code snippet shows the implementation of xDimension.