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 provide an input file of the format .webp/.jpeg or .png to the open() method. This method returns the image file object as a response. 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.

To know more about the component instance zia used below, please refer to this help section.

Parameters Used

Parameter Name Data Type Definition
img Image A Mandatory parameter. Will store the ID of the model to be trained.
options Array A Mandatory parameter. Will store the format of the barcode.
    
copy
zia = app.zia() img = open("sample.webp", "rb") result = zia.scan_barcode(img, options={"format": "code39"})

A sample response is shown below :

    
copy
{ "content":"https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html" }
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.

Last Updated 2025-03-28 18:24:49 +0530 +0530

ON THIS PAGE