Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamsoft-javascript-barcode

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamsoft-javascript-barcode

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

  • 7.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5K
decreased by-82.41%
Maintainers
2
Weekly downloads
 
Created
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 dbr = require('dynamsoft-javascript-barcode');
dbr.BarcodeReader.productKeys = 'LICENSE-KEY';
dbr.BarcodeReader.createInstance().then(reader => {
    reader.decode('sample.png').then(results => {
        for(var i = 0; i < results.length; ++i){
            console.log(results[i].BarcodeText);
        }
        reader.destroy();
    });
});

Web

<!DOCTYPE html>
<html>
<body>
    <script src="node_modules/dynamsoft-javascript-barcode/dist/dbr.min.js" data-productKeys="LICENSE-KEY"></script>
    <script>
        let barcodeScanner = null;
        Dynamsoft.BarcodeScanner.createInstance({
            onFrameRead: results => {console.log(results);},
            onUnduplicatedRead: (txt, result) => {alert(txt);}
        }).then(scanner => {
            barcodeScanner = scanner;
            barcodeScanner.show();
        });
    </script>
</body>
</html>

Alternatively, you can use the jsDelivr CDN as follows:

<!DOCTYPE html>
<html>
<body>
    <script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7/dist/dbr.min.js" data-productKeys="LICENSE-KEY"></script>
    <script>
        let barcodeScanner = null;
        Dynamsoft.BarcodeScanner.createInstance({
            onFrameRead: results => {console.log(results);},
            onUnduplicatedRead: (txt, result) => {alert(txt);}
        }).then(scanner => {
            barcodeScanner = scanner;
            barcodeScanner.show();
        });
    </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

Package last updated on 12 Sep 2019

Did you know?

Socket

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc