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 .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.

The zia reference used below is defined in the component instance page.The promise returned here is resolved to a JSON object.

    
copy
let fs = require('fs'); zia.scanBarcode(fs.createReadStream('./barcode.png'), {format: 'code39'}) //Pass the input file and the format .then((result) => { console.log(result); }) .catch((err) => console.log(err.toString())); //Push errors to Catalyst Logs

A sample response that you will receive is shown below. The response is the same for both versions of Node.js.

Node js

    
copy
{ "content": "https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html" }

Last Updated 2023-09-03 01:06:41 +0530 +0530

ON THIS PAGE

RELATED LINKS

Barcode scanner - API