Barcode reader written in Ts and using webassembly. In addition, it calculates the check digit as well.
Run build.sh to build a docker and update the webassembly.
https://emirdeliz.github.io/barcode-reader-zbar-webassembly/
Added the static files (barcode-reader.js and barcode-reader.wasm) on the server. And then use the code below.
const result = BarcodeReader.readBarcodeFromStack({
file,
});
or
const result = BarcodeReader.readBarcode({
file,
});
Method | Description |
---|---|
readBarcodeFromStack | This method receives a ReadBarcodeProps and inserts the request on the stack of requests. This can be utils when you make multiple barcodes reads at the same. |
readBarcode | This method receives a ReadBarcodeProps and makes a simple read. |
Prop | Type | Description |
---|---|---|
file (optional) | boolean | The file related to pdf file. |
scale (optional) | boolean | The scale or zoom applied on the pdf document before the search barcode. |
sequenceNum (optional) | Number | The sequence number of the image when working with multiple barcodes. |
password (optional) | String | The password to open the pdf file. |