@radzor/barcode-scan
Generate and scan 1D and 2D barcodes. Supports Code128, EAN-13, UPC-A, ITF, Code39, QR Code, and Data Matrix. Produces SVG/PNG output and decodes from image buffers.
Mediav0.1.0typescriptBrowserbarcodeeanqr-codescanretaillogisticsencodeby Radzor
Install
View source on GitHub →$npx radzor@latest add barcode-scan
⚠ Constraints: EAN-13 requires exactly 12 or 13 digits. UPC-A requires 12 digits. Code39 is uppercase alphanumeric only. For scanning, provide a high-contrast image with adequate resolution (>72 DPI).
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| format | 'code128' | 'ean13' | 'upca' | 'itf' | 'code39' | 'qrcode' | 'datamatrix' | code128 | Default barcode format for generation. |
| width | number | 200 | Barcode width in pixels. |
| height | number | 80 | Barcode height in pixels (ignored for 2D formats). |
| includeText | boolean | true | Render human-readable text below the barcode. |
format'code128' | 'ean13' | 'upca' | 'itf' | 'code39' | 'qrcode' | 'datamatrix'
Default barcode format for generation.
default: code128
widthnumber
Barcode width in pixels.