Skip to content

Commit 9b05d19

Browse files
committed
Update README.md
1 parent 0746b7f commit 9b05d19

1 file changed

Lines changed: 6 additions & 32 deletions

File tree

use-case/README.md

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,19 @@
22

33
It's difficult to type long text on mobile devices, but if that text is encoded in a barcode, we can use the sdk to read the barcode and automatically enter the text.
44

5-
The following code shows how to automatically invoke the sdk to read a barcode and fill in an input box.
6-
7-
```html
8-
<input id="input-to-fill" type="text" readonly="true" placeholder="Barcode Result">
9-
```
10-
11-
```javascript
12-
let scanner = null;
13-
Dynamsoft.DBR.BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
14-
(async function () {
15-
document.getElementById("input-to-fill").addEventListener('click', async function () {
16-
try {
17-
scanner = scanner || await Dynamsoft.DBR.BarcodeScanner.createInstance();
18-
scanner.onUniqueRead = (txt, result) => {
19-
this.value = result.barcodeText;
20-
scanner.hide();
21-
};
22-
await scanner.show();
23-
} catch (ex) {
24-
alert(ex.message);
25-
throw ex;
26-
}
27-
});
28-
})();
29-
```
30-
315
The following sample demonstrates how to utilize the SDK to fill out form fields.
326

33-
* <a target = "_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/4.use-case/1.fill-a-form-with-barcode-reading.html">Read Barcodes and Fill Form Fields - Demo</a>
34-
* <a target = "_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/4.use-case/1.fill-a-form-with-barcode-reading.html">Read Barcodes and Fill Form Fields - Source Code</a>
7+
* <a target = "_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/use-case/fill-a-form-with-barcode-reading.html">Read Barcodes and Fill Form Fields - Demo</a>
8+
* <a target = "_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/use-case/fill-a-form-with-barcode-reading.html">Read Barcodes and Fill Form Fields - Source Code</a>
359

3610
# Read the PDF417 Barcode on the Driver's License
3711

3812
The PDF417 barcode on an AAMVA compatible driver's license contains a lot of information which is encoded following the DL/ID Card Design Standard. Together with a simple parse function, we can use the SDK to read and extract the information.
3913

4014
The following official sample shows how to use the sdk to read and extract driver's license information.
4115

42-
* <a target = "_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/4.use-case/2.read-a-drivers-license.html">Read the PDF417 Barcode on the Driver&apos;s License - Demo</a>
43-
* <a target = "_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/4.use-case/2.read-a-drivers-license.html">Read the PDF417 Barcode on the Driver&apos;s License - Source Code</a>
16+
* <a target = "_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/use-case/read-a-drivers-license.html">Read the PDF417 Barcode on the Driver&apos;s License - Demo</a>
17+
* <a target = "_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/use-case/read-a-drivers-license.html">Read the PDF417 Barcode on the Driver&apos;s License - Source Code</a>
4418

4519
Also see [Driver's License Scanner SDK for Mobile and Web](https://www.dynamsoft.com/use-cases/driver-license/).
4620

@@ -50,8 +24,8 @@ When the SDK picks up a barcode in video stream, it will highlight them with bui
5024

5125
The following official sample shows how to show result texts on the video.
5226

53-
* <a target = "_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/4.use-case/3.show-result-texts-on-the-video.html">Read barcodes via camera and show result texts on the video - Demo</a>
54-
* <a target = "_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/4.use-case/3.show-result-texts-on-the-video.html">Read barcodes via camera and show result texts on the video - Source Code</a>
27+
* <a target = "_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/use-case/show-result-texts-on-the-video.html">Read barcodes via camera and show result texts on the video - Demo</a>
28+
* <a target = "_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/use-case/show-result-texts-on-the-video.html">Read barcodes via camera and show result texts on the video - Source Code</a>
5529

5630
## Support
5731

0 commit comments

Comments
 (0)