A WebAssembly barcode library for building JavaScript barcode detection apps.
Overview
Dynamsoft Barcode Reader JS is a recognition SDK which enables you to embed barcode reading functionality in your web, desktop, and mobile applications. With a few lines of JavaScript code, you can develop a robust application to scan a linear barcode, QR Code, DataMatrix, PDF417, and Aztec Code.
Installation
npm install dbrjs
Barcode Types Support
- 1D barcode: Code 39, Code 93, Code 128, Codabar, EAN-8, EAN-13, UPC-A, UPC-E, Interleaved 2 of 5 (ITF), Industrial 2 of 5 (Code 2 of 5 Industry, Standard 2 of 5, Code 2 of 5), ITF-14.
- 2D barcode: QRCode, DataMatrix, PDF417, and Aztec Code.
Online Demo
https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html
Usage
Node.js server-side:
const fs = ;var source = fs;var typedArray = source;const Module = ;Module { let dbr = "<License>"; let results = dbr; let json = JSON; let barcodeResults = json'textResult'; let txts = ; for let i = 0; i < barcodeResultslength; ++i txts; console;};
Web client-side:
var reader;Module { documentstyledisplay = 'none'; buttonFiledisabled = false; buttonVideodisabled = false; reader = "<License>";}; if reader try // results = reader.DecodeBuffer(idd.buffer, imageWidth, imageHeight, imageWidth * 4, 7, ""); let results = reader; let json = JSON; let barcodeResults = json'textResult'; let txts = ; for let i = 0; i < barcodeResultslength; ++i txts; barcode_resulttextContent = txts; catch e console;
License
Apply for a trial license at https://www.dynamsoft.com/CustomerPortal/Portal/Triallicense.aspx.