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
| Name | Description |
|---|
| BarCodeReader(object, object, object) | Initializes a new instance of the BarCodeReader. |
Methods
| Name | Description |
|---|
| 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. |
| getBarCodeDecodeType | Gets the decode type of the input barcode decoding. |
| getBarcodeSettings | The main BarCode decoding parameters. Contains parameters which make influence on recognized data. |
| getFoundBarCodes | Gets recognized BarCodeResult array. |
| getFoundCount | Gets recognized barcodes count. |
| getQualitySettings | 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. |
| getTimeout | Gets the timeout of recognition process in milliseconds. |
| importFromXml(object) | Exports BarCode properties to the xml-file specified. |
| init | |
| javaClassName | |
| readBarCodes | Reads 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
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