@pixelverse/strichjs-sdk
Version:
STRICH JavaScript Barcode Scanning SDK
81 lines (54 loc) • 2.69 kB
Markdown
# STRICH JavaScript Barcode Scanning SDK
## Quickstart
Install from NPM for bundling:
```shell
npm install @pixelverse/strichjs-sdk
```
Or import from CDN dynamically:
```javascript
import {StrichSDK, PopupScanner} from 'https://cdn.jsdelivr.net/npm/@pixelverse/strichjs-sdk@latest';
```
Initialize the SDK with your license key and use [PopupScanner](https://docs.strich.io/the-popup-scanner.html) for easy scanning.
```javascript
// SDK initialization using license key
await StrichSDK.initialize('<your license key>');
// scan barcodes using PopupScanner
let detections = PopupScanner.scan({ symbologies: ['qr', 'code128'] });
if (detections) {
console.log(`Scanned code: ${detections[0].data}`);
}
```
A license key is required, and can be obtained in the [STRICH Customer Portal](https://portal.strich.io).
## Sample Code
Sample code illustrating usage of the SDK in different environments is available on GitHub:
- [Vanilla JS sample code](https://github.com/pixelverse-llc/strich-javascript-sample)
- [Angular sample code](https://github.com/pixelverse-llc/strich-angular-sample)
- [React sample code](https://github.com/pixelverse-llc/strich-react-sample)
- [Vue sample code](https://github.com/pixelverse-llc/strich-vue3-sample)
## Documentation
- [Getting Started](https://docs.strich.io/getting-started.html)
- [API Reference](https://docs.strich.io/reference/index.html)
- [Release Notes](https://docs.strich.io/release-notes.html)
## Supported Barcode Types
**1D Barcodes**
- EAN-13/EAN-8
- UPC-A/UPC-E
- Code 128
- Code 39
- ITF (Interleaved-2-of-5)
- GS1 DataBar
- Codabar
- MSI Plessey
- PDF417
**2D Barcodes**
- QR Code (including Micro QR Code)
- Data Matrix
- Aztec Code
For more information, please refer to the [Symbologies documentation](https://docs.strich.io/supported-symbologies.html).
## Browser Compatibility
We don't publish a list of supported browser versions, but test our SDK regularly with the popular ones: Chrome/Chromium-based, Safari and Firefox.
STRICH runs completely client-side in your web browser or web view. Access to WebGL, WebAssembly and the device camera using the MediaDevices API is required. Support for the [<dialog> element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog#browser_compatibility) is required for using the PopupScanner.
An easy way to check if your device and browser are supported is to open the
[Demo App](https://demo.strich.io) and try scanning some barcodes.
## License
STRICH is commercial software, its use is governed by the terms of the Subscription License Agreement available in the [Customer Portal](https://portal.strich.io).