Barcode Scanner

Zia Barcode Scanner enables you to scan the most commonly used linear and 2D barcode formats and decode the encoded data. Barcode Scanner can detect formats like Codabar, EAN-13, ITF, UPC-A, QR Code, and more.

You can learn more from the Barcode Scanner help page.

You can provide an input file of the format .jpg/.jpeg or .png. Refer to the API documentation for the request and response formats.

You can specify the barcode format using setFormat. If you enter the format as ALL, Barcode Scanner automatically detects the format. It provides the decoded information as the response.

Ensure the following packages are imported:

Copiedimport com.zc.component.ml.ZCBarcodeData;
import com.zc.component.ml.ZCBarcodeFormat;
import com.zc.component.ml.ZCBarcodeOptions;
import com.zc.component.ml.ZCML;
CopiedFile file = new File("{filePath}"); //Specify the file path
ZCBarcodeOptions options = ZCBarcodeOptions.getInstance().setFormat(ZCBarcodeFormat.ALL); //Specify the format
ZCBarcodeData barcodeResult = ZCML.getInstance().scanBarcode(file, options); //Call scanBarcode() with the input file and options
String content = barcodeResult.getContent(); //getContent() obtains the decoded content