This sample demonstrates decoding DataMatrix barcodes from camera or image input using the Dynamsoft Barcode Reader (JavaScript edition).
index.html— Demo page (camera & image input) and UI.ReadDataMatrix.json— Example configuration used by the sample.
Opening HTML files directly may not work as expected. Instead, run a local development server. Here’s a quick method using Visual Studio Code:
-
Install the Five Server extension from the VS Code Marketplace.
-
Right-click on
index.htmland select "Open with Five Server". This will serve the application athttp://127.0.0.1:5500/index.html. -
Allow camera access when prompted and point the camera at a barcode.
- Enabling DataMatrix decoding and related tuning.
- Tips for scanning small or dense DataMatrix symbols.
- Using a JSON template to configure decoder behavior.
- Run via HTTP(S) or localhost; opening files via
file://may break module loading or camera permissions. - See the repository root
README.mdfor general instructions and API documentation links.