Simple and Fast Barcode decoder with support of Code128, Code93, Code39, Standard/Industrial 2 of 5, Interleaved 2 of 5, Codabar, EAN-13, EAN-8 barcodes in java
Simple and Fast Barcode decoder with support of Code128, Code93, Code39, Standard/Industrial 2 of 5, Interleaved 2 of 5, Codabar, EAN-13, EAN-8 barcodes in java
Simple & Fast Barcode decoder for Browsers and Node.js capable of reading multiple barcode formats including Code128 (UCC/EAN-128), Code93, Code39, Standard/Industrial 2 of 5, Interleaved 2 of 5, Codabar, EAN-13, EAN-8, UPC-A, UPC-E, MSI, and Pharmacode.
https://codesandbox.io/s/javascript-barcode-reader-liium
Recommended way to install is by using package manager (npm, yarn etc):
npm i javascript-barcode-readeror use cdn:
or download manually:
…javascriptBarcodeReader will be available as global in Browsers.
javascriptBarcodeReader({
/* Image ID || HTML5 Image || HTML5 Canvas || HTML5 Canvas ImageData || Image URL */
image: source,
barcode: 'code-2of5',
// barcodeType: 'industrial', // for code-2of5: 'industrial' or 'interleaved'
options: {
// useAdaptiveThreshold: true // for images with shaded/ gradient portions
// singlePass: true
// detectRotation: true // auto-detect and correct rotation
// locateBarcode: true // auto-locate barcode region
},
})
.then((code) => {
console.log(code)
})
.catch((err) => {
console.log(err)
})| Barcode Type | Value |
|---|---|
| EAN-13 | 'ean-13' |
| EAN-8 | 'ean-8' |
| UPC-A | 'upc-a' |
| UPC-E | 'upc-e' |
| Code-39 | 'code-39' |
| Code-93 | 'code-93' |
| Code-2of5 | 'code-2of5' |
| Codabar | 'codabar' |
| Code-128 | 'code-128' |
| MSI | 'msi' |
| Pharmacode | 'pharmacode' |
useAdaptiveThreshold: Apply adaptive thresholding for images with shading or gradientssinglePass: Use single-pass decoding for faster processingdetectRotation: Automatically detect and correct barcode rotationlocateBarcode: Automatically locate barcode region in imagesrc directory as a module.test directory using Jest.MIT
No open issues yet, or sync has not completed.