A focused demo that decodes and parses barcode data from driver's license images (camera or file input). The sample demonstrates extracting structured fields (name, DOB, license number, address, etc.) using a parsing template.
index.html— main demo page (camera + image input UI).SampleDriversLicense.jpg— example license image.read_dl.json— JSON template used by the sample.
- Decode driver's license barcode (PDF417 / AAMVA formats) from camera or static image
- Parse and display structured fields
- Simple UI for testing and validating parsing rules
- The page initializes the barcode scanner to decode the license barcode from an image or live video frame.
- The sample parsed fields are rendered in the UI alongside the raw decoded text; the sample also highlights parsing errors or missing fields for easier troubleshooting.
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".
- Use high-resolution images or a higher camera resolution for reliable decoding and parsing.
- Test with multiple sample licenses to ensure the parsing template covers expected variants.
- Serve via localhost or HTTPS to enable camera access.
- Replace the included trial/demo license with a valid Dynamsoft license for extended evaluation.
- See the repository root
README.mdfor running instructions and API documentation.