new BarcodeSettings(settings)

BarcodeSettings copy constructor

Parameter

Name Type Optional Description

settings

 

 

The source of the data

Methods

static

construct(settings)

BarcodeSettings copy constructor

Parameter

Name Type Optional Description

settings

 

 

The source of the data

getAustraliaPost()

Gets AustraliaPost decoding parameters

Returns

The AustraliaPost decoding parameters which make influence on recognized data of AustraliaPost symbology

getChecksumValidation()

Enable checksum validation during recognition for 1D and Postal barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5 Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies

Example

let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128"); generator.save("c:/test.png", BarcodeImageFormat.PNG); let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13); //checksum disabled reader.getBarcodeSettings().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("c:/test.png", DecodeType.EAN_13); //checksum enabled reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON); reader.readBarCodes().forEach(function(result, i, results) { console.log ("BarCode CodeText: " + result.CodeText); console.log ("BarCode Value: " + result.getExtended().getOneD().getValue()); console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); });

Returns

Enable checksum validation during recognition for 1D and Postal barcodes.

getDetectEncoding()

The flag which force engine to detect codetext encoding for Unicode codesets. Default value is true.

Example

let generator = new BarcodeGenerator(EncodeTypes.QR, "Слово")) $im = generator.generateBarcodeImage(BarcodeImageFormat.PNG);

//detects encoding for Unicode codesets is enabled let reader = new BarCodeReader(im, DecodeType.QR); reader.getBarcodeSettings().setDetectEncoding(true); reader.readBarCodes().forEach(function(result, i, results) { console.log ("BarCode CodeText: ".result.getCodeText()); }); //detect encoding is disabled let reader = new BarCodeReader(im, DecodeType.QR); reader.getBarcodeSettings().setDetectEncoding(false); reader.readBarCodes().forEach(function(result, i, results) console.log ("BarCode CodeText: " + result.getCodeText());

Returns

The flag which force engine to detect codetext encoding for Unicode codesets

getStripFNC()

Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.

Example

let generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754"); generator.save("c:/test.png", BarcodeImageFormat.PNG); let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);

//StripFNC disabled reader.getBarcodeSettings().setStripFNC(false); reader.readBarCodes().forEach(function(result, i, results) { console.log ("BarCode CodeText: ".result.getCodeText()); });

let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);

//StripFNC enabled reader.getBarcodeSettings().setStripFNC(true); reader.readBarCodes().forEach(function(result, i, results) { console.log ("BarCode CodeText: ".result.getCodeText()); });

Returns

Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.

setChecksumValidation(value)

Enable checksum validation during recognition for 1D and Postal barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5 Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies

Example

let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128"); generator.save("c:/test.png", BarcodeImageFormat.PNG); let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13); //checksum disabled reader.getBarcodeSettings().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("c:/test.png", DecodeType.EAN_13); //checksum enabled reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON); reader.readBarCodes().forEach(function(result, i, results) { console.log ("BarCode CodeText: " + result.CodeText); console.log ("BarCode Value: " + result.getExtended().getOneD().getValue()); console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); });

Parameter

Name Type Optional Description

value

 

 

Enable checksum validation during recognition for 1D and Postal barcodes.

setStripFNC(value)

Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.

Example

let generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754"); generator.save("c:/test.png", BarcodeImageFormat.PNG); let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);

//StripFNC disabled reader.getBarcodeSettings().setStripFNC(false); reader.readBarCodes().forEach(function(result, i, results) { console.log ("BarCode CodeText: ".result.getCodeText()); });

let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);

//StripFNC enabled reader.getBarcodeSettings().setStripFNC(true); reader.readBarCodes().forEach(function(result, i, results) { console.log ("BarCode CodeText: ".result.getCodeText()); });

Parameter

Name Type Optional Description

value

 

 

Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.