# Reading barcodes with the ZXing library
Barcodes are read via the static getBarcode
method of the ELOas class ELOAsUtils
. In this method, the file, the file page with the barcode, and the barcode configuration are transferred as parameters.
String barcode = ELOAsUtils.getBarcode(IXconnect ixConnect, File file,
int page, String barcodeConfig);
The individual settings in the barcode configuration are separated by a pipe symbol. An example configuration could look like this.
Example
String barcodeConfig = "POSSIBLE_FORMATS:CODE_128,QR_CODE|
CHARACTER_SET:UTF8|ALLOWED_EAN_EXTENSIONS:2,5|
PURE_BARCODE:TRUE|RETURN_CODABAR_START_END:TRUE|
ASSUME_CODE_39_CHECK_DIGIT:TRUE|TRY_HARDER:TRUE";
In addition, the method getBarcodeResult
is available in the class ELOAsUtils
. This method returns the entire barcode result.
Example
Result barcodeResult = ELOAsUtils.getBarcodeResult(IXconnect ixConnect,
File file,
int page,
String barcodeConfig);
# Barcodes formats in the ZXing library
Refer to the official ZXing library documentation for supported barcode formats. The individual formats are listed in the ZXing class BarcodeFormat
. Further information can be found at: http://zxing.github.io/zxing/apidocs/ (opens new window).
The following formats are supported:
- Aztec 2D
- CODABAR 1D
- Code 128 1D
- Code 39 1D
- Code 93 1D
- Data Matrix 2D
- EAN-13 1D
- EAN-8 1D
- ITF (Interleaved Two of Five) 1D
- MaxiCode 2D
- PDF417
- QR Code 2D
- RSS 14
- RSS EXPANDED
- UPC-A 1D
- UPC-E 1D
- UPC/EAN extension