Socket
Socket
Sign inDemoInstall

dynamsoft-barcode-reader-web-sdk

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dynamsoft-barcode-reader-web-sdk

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


Version published
Weekly downloads
1
Maintainers
1
Install size
6.74 MB
Created
Weekly downloads
 

Readme

Source

Dynamsoft JavaScript Barcode SDK for Node and Web

Dynamsoft JavaScript Barcode SDK

A WebAssembly barcode library for building JavaScript barcode detection apps.

Overview

Dynamsoft JavaScript Barcode Reader 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.

Supported Barcode Symbologies

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

Browser Compatibility

BrowserVersion
Chromev57+
Firefoxv52+
Edgev16+
Safari*v11+
Internet Explorernot supported

Usage

Node

var BarcodeReader = require('dynamsoft-barcode-reader-web-sdk');
BarcodeReader.licenseKey = 'LICENSE-KEY';
BarcodeReader.createInstance().then(reader => {
    reader.decode('sample.png').then(results => {
        for(var i = 0; i < results.length; ++i){
            console.log(results[i].BarcodeText);
        }
        reader.deleteInstance();
    });
});

Web

<!DOCTYPE html>
<html>
<body>
    <script src="node_modules/dynamsoft-barcode-reader-web-sdk/dist/dbr.min.js"></script>
    <script>
        BarcodeReader.licenseKey = 'LICENSE-KEY';
        let videoReader = new BarcodeReader.Scanner({
            onFrameRead: results => {console.log(results);},
            onNewCodeRead: (txt, result) => {alert(txt);}
        });
        videoReader.open();
    </script>
</body>
</html>

Alternatively, you can use the jsDelivr CDN as follows:

<!DOCTYPE html>
<html>
<body>
    <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-web-sdk/dist/dbr.min.js"></script>
    <script>
        BarcodeReader.licenseKey = 'LICENSE-KEY';
        let videoReader = new BarcodeReader.Scanner({
            onFrameRead: results => {console.log(results);},
            onNewCodeRead: (txt, result) => {alert(txt);}
        });
        videoReader.open();
    </script>
</body>
</html>

Use Web Server for Chrome for quick deployment.

API Reference

https://www.dynamsoft.com/help/Barcode-Reader-wasm/index.html

Samples

  • samples/node
  • samples/web

More: https://github.com/dynamsoft-dbr/javascript-barcode

Online Demo

https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html

Web barcode reader

License

Get a FREE 30-day trial license.

Contact Us

https://www.dynamsoft.com/Company/Contact.aspx

Keywords

FAQs

Last updated on 29 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc