BarCodeReader

BarCodeReader class

BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.

public class BarCodeReader : joint.BaseJavaClass

Constructors

NameDescription
BarCodeReader(object, object, object)Initializes a new instance of the BarCodeReader.

Methods

NameDescription
abort
construct(object)
containsAny(object)Determines whether any of the given decode types is included into.
convertToString(object)internal.
exportToXml(object)Exports BarCode properties to the xml-file specified.
getBarCodeDecodeTypeGets the decode type of the input barcode decoding.
getBarcodeSettingsThe main BarCode decoding parameters. Contains parameters which make influence on recognized data.
getFoundBarCodesGets recognized BarCodeResult array.
getFoundCountGets recognized barcodes count.
getQualitySettingsQualitySettings allows to configure recognition quality and speed manually. You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of QualitySettings is NormalQuality.
getTimeoutGets the timeout of recognition process in milliseconds.
importFromXml(object)Exports BarCode properties to the xml-file specified.
init
javaClassName
readBarCodesReads BarCodeResult from the image.
setBarCodeImage(object, object)Sets bitmap image and areas for recognition. Must be called before ReadBarCodes() method.
setBarCodeReadType(object)Sets SingleDecodeType type array for recognition. Must be called before readBarCodes() method.
setQualitySettings(object)QualitySettings allows to configure recognition quality and speed manually. You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of QualitySettings is NormalQuality.
setTimeout(object)Sets the timeout of recognition process in milliseconds.

Fields

NameDescription
barcodeSettings
qualitySettings
recognizedResults

Examples

//This sample shows how to detect Code39 and Code128 barcodes.
let reader = new BarCodeReader("test.png", null,  [DecodeType.CODE_39, DecodeType.CODE_128]);
let results = reader.readBarCodes();
for(let i = 0; i < results.length; i++)
{
let result = results[i];
console.log("BarCode Type: " + result.getCodeTypeName());
console.log("BarCode CodeText: " + result.getCodeText());
}

See Also