new BarcodeGenerator(encodeType, codeText)

BarcodeGenerator constructor.

Parameters

Name Type Optional Description

encodeType

 

 

Barcode symbology type. Use EncodeTypes class to setup a symbology

codeText

 

 

Text to be encoded.

Throws

BarcodeException

Methods

generateBarcodeImage(format_name)

Generate the barcode image under current settings. This sample shows how to create and save a barcode image.

Parameter

Name Type Optional Description

format_name

 

 

image format name("PNG", "BMP", "JPEG", "GIF", "TIFF") let generator = new BarCodeGenerator(EncodeTypes.CODE_128); let image = generator.generateBarCodeImage(null);// if value = null, default image format PNG

Returns

Barcode image.

getBarcodeType()

Barcode symbology type.

getCodeText()

Text to be encoded.

getParameters()

Generation parameters.

Returns

BaseGenerationParameters

save(filePath, format_name)

Save barcode image to specific file in specific format.

Parameters

Name Type Optional Description

filePath

 

 

Path to save to.

format_name

 

 

image format name("PNG", "BMP", "JPEG", "GIF", "TIFF") let generator = new BarCodeGenerator(EncodeTypes.CODE_128); generator.save("file path", null);// if value = null, default image format PNG

setBarcodeType()

Barcode symbology type.

setCodeText()

Text to be encoded.