Globals
Properties
Properties
AddressType
Address type
AutoSizeMode
Specifies the different types of automatic sizing modes. Default value is AutoSizeMode.NONE. This sample shows how to create and save a BarCode image. let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX); generator.setAutoSizeMode(AutoSizeMode.NEAREST); generator.getBarCodeWidth().setMillimeters(50); generator.getBarCodeHeight().setInches(1.3f); generator.save("test.png");
AztecSymbolMode
Specifies the Aztec symbol mode.
let generator = new BarcodeGenerator("125", EncodeTypes.AZTEC); generator.getParameters().getBarcode().getAztec().setAztecSymbolMode(AztecSymbolMode.RUNE); generator.save("test.png");
BarCodeConfidence
Contains recognition confidence level This sample shows how BarCodeConfidence changed, depending on barcode type //Moderate confidence let generator = new BarcodeGenerator(EncodeTypes.CODE_128, "12345"); generator.save("test.png"); let reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_STANDARD, DecodeType.CODE_128]); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode Type: " + result.getCodeTypeName()); console.log("BarCode CodeText: " + result.getCodeText()); console.log("BarCode Confidence: " + result.getConfidence()); console.log("BarCode ReadingQuality: " + result.getReadingQuality()); }); //Strong confidence let generator = new BarcodeGenerator(EncodeTypes.QR, "12345"); generator.save("test.png"); let reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_STANDARD, DecodeType.QR]); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode Type: " + result.getCodeTypeName()); console.log("BarCode CodeText: " + result.getCodeText()); console.log("BarCode Confidence: " + result.getConfidence()); console.log("BarCode ReadingQuality: " + result.getReadingQuality()); });
BorderDashStyle
Specifies the style of dashed border lines.
ChecksumValidation
Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies This sample shows influence of ChecksumValidation on recognition quality and results let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128"); generator.save("test.png"); let reader = new BarCodeReader("test.png", DecodeType.EAN_13); //checksum disabled reader.setChecksumValidation(ChecksumValidation.OFF); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode CodeText: " + result.getCodeText()); console.log("BarCode Value: " + result.getExtended().getOneD().getValue()); console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); }); let reader = new BarCodeReader("test.png", DecodeType.EAN_13); //checksum enabled reader.setChecksumValidation(ChecksumValidation.ON); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode CodeText: " + result.getCodeText()); console.log("BarCode Value: " + result.getExtended().getOneD().getValue()); console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); });
CodabarChecksumMode
Specifies the checksum algorithm for Codabar
CodabarSymbol
Specifies the start or stop symbol of the Codabar barcode specification.
CodeLocation
Codetext location
CustomerInformationInterpretingType
Defines the interpreting type(C_TABLE or N_TABLE) of customer information for AustralianPost BarCode.
DataMatrixEccType
Specify the type of the ECC to encode.
DataMatrixEncodeMode
DataMatrix encoder's encoding mode, default to AUTO
DecodeType
Specify the type of barcode to read. This sample shows how to detect Code39 and Code128 barcodes. let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode Type: " + result.getCodeTypeName()); console.log("BarCode CodeText: " + result.getCodeText()); });
ECIEncodings
Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. Currently, it is used only for QR 2D barcode.
Example how to use ECI encoding
let generator = new BarcodeGenerator(EncodeTypes.QR);
generator.setCodeText("12345TEXT");
generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.ECIEncoding);
generator.getParameters().getBarcode().getQR().setQrEncodeType(QREncodeType.ForceQR);
generator.getParameters().getBarcode().getQR().setQrECIEncoding(ECIEncodings.UTF8);
generator.save("test.png", "PNG");
FontMode
Font size mode.
GraphicsUnit
Specifies the unit of measure for the given data.
ITF14BorderType
ITF14 barcode's border type
PatchFormat
PatchCode format. Choose PatchOnly to generate single PatchCode. Use page format to generate Patch page with PatchCodes as borders
Pdf417CompactionMode
Pdf417 barcode's compation mode
Pdf417ErrorLevel
pdf417 barcode's error correction level, from level 0 to level 9, level 0 means no error correction, level 9 means best error correction
QrBillStandardVersion
SwissQR bill standard version
QREncodeMode
Encoding mode for QR barcodes. It is recomended to Use AUTO with CodeTextEncoding = Encoding.UTF8 for latin symbols or digits and UTF_8_BOM for unicode symbols.
QREncodeType
QR / MicroQR selector mode. Select FORCE_QR for standard QR symbols, AUTO for MicroQR. FORCE_MICRO_QR is used for strongly MicroQR symbol generation if it is possible.
QRErrorLevel
Level of Reed-Solomon error correction. From low to high: LEVEL_L, LEVEL_M, LEVEL_Q, LEVEL_H.
QRVersion
Version of QR Code. From Version1 to Version40 for QR code and from M1 to M4 for MicroQr.
TextAlignment
Text alignment.