![Dynamsoft Barcode Reader JS](https://www.dynamsoft.com/assets/img-icon/logo-dbr-white-312x68.png)
A JavaScript barcode library for building Node.js barcode reading apps.
Overview
Dynamsoft Barcode Reader enables you to efficiently embed barcode reading functionality in your web, desktop or mobile application using just a few lines of code. This can save you months of added development time and extra costs. With our SDK, you can create high-speed and reliable barcode scanner software to meet your business needs.
Installation
npm install dbr
Supported Barcode Types
- 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
Supported Operating System
Online Demo
https://demo.dynamsoft.com/DBR/BarcodeReaderDemo.aspx
HowTo
Node.js
var dbr = require('dbr');
var barcodeTypes = dbr.barcodeTypes;
dbr.initLicense("Dynamsoft Barcode Reader license");
dbr.decodeFileAsync(fileName, barcodeTypes, function(err, msg) {
let result = null;
for (index in msg) {
result = msg[index];
console.log("Format: " + result['format']);
console.log("Value : " + result['value']);
console.log("##################");
}
}, "");
APIs
- initLicense(license)
- decodeYUYVAsync(buffer, width, height, barcodeTypes, callback, template)
- decodeBase64Async(base64, barcodeTypes, callback, template)
- decodeFileStreamAsync(fileStream, fileSize, barcodeTypes, callback, template)
- decodeFileAsync(fileName, barcodeTypes, callback, template)
You can use ""
for template.
License
Apply for a trial license at https://www.dynamsoft.com/CustomerPortal/Portal/Triallicense.aspx.
Contact Us
support@dynamsoft.com