Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit d6668a4

Browse files
authored
Merge pull request #5 from Dynamsoft/_dev
Dev
2 parents 73ee507 + 6952600 commit d6668a4

19 files changed

+229
-214
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ __pycache__
2828
==*
2929
package-lock.json
3030
yarn.lock
31+
sonar-project.properties
32+
.npmrc
3133
.git
34+
log.txt
3235
/*.zip
3336
/*.py
3437
/*.exe
@@ -48,6 +51,8 @@ yarn.lock
4851
/public
4952
/original_model_files
5053
/dce
54+
/.scannerwork
55+
/js_scanreport
5156
/README.html
5257

5358
!bower.json

Api Reference.url

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[InternetShortcut]
2-
URL=https://www.dynamsoft.com/label-recognition/programming/javascript/?ver=2.2.11
2+
URL=https://www.dynamsoft.com/label-recognition/programming/javascript/?ver=latest

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright © 2003–2022 Dynamsoft. All Rights Reserved.
1+
Copyright © 2003–2023 Dynamsoft. All Rights Reserved.
22

33
The use of this software is governed by the Dynamsoft Terms and Conditions.
44
URL=https://www.dynamsoft.com/label-recognition/license-agreement/

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<!--The original doc is hosted here => https://github.com/dynamsoft-docs/label-recognition-docs/blob/master/programming/javascript/user-guide.md -->
2-
32
# Dynamsoft Label Recognizer for Your Website
43

54
Add the capability of reading passport MRZs, ID cards, VIN numbers, and various other fixed text fields in your web application with just a few lines of code.
@@ -44,8 +43,8 @@ The complete code of the "MRZ Reading" example is shown below
4443

4544
<head>
4645
<title>MRZ Reading</title>
47-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-label-recognizer@2.2.11/dist/dlr.js"></script>
48-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.0.1/dist/dce.js"></script>
46+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-label-recognizer@2.2.30/dist/dlr.js"></script>
47+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.2.0/dist/dce.js"></script>
4948
</head>
5049

5150
<body>
@@ -100,7 +99,7 @@ The complete code of the "MRZ Reading" example is shown below
10099

101100
<p align="center" style="text-align:center; white-space: normal; ">
102101
<a target="_blank" href="https://jsfiddle.net/DynamsoftTeam/kc35htxd/" title="Run via JSFiddle">
103-
<img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;">
102+
<img src="https://cdn.jsdelivr.net/npm/simple-icons@3.2.0/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;">
104103
</a>
105104
</p>
106105

@@ -125,12 +124,13 @@ The complete code of the "MRZ Reading" example is shown below
125124
>| `MRZ` | For MRZ (machine-readable zone) recognition. |
126125
>| `passportMRZ` | For passport MRZ recognition. |
127126
>| `visaMRZ` | For Visa (Country not Credit Card) MRZ recognition. |
127+
>| `idcardMRZ` | For ID card MRZ recognition. |
128128
>| `VIN` | For VIN (vehicle identification number) recognition. |
129129
>| `VIN_NA` | For North American VIN (vehicle identification number) recognition. |
130130
>
131131
> When recognizing from video input, add the prefix "video-" for a slightly different template optimized for continuous frame recognition. For example, use `video-passportMRZ` to read the MRZ on passports with a camera.
132132
133-
* `onMRZRead`: This event is only used with one of the templates "MRZ", "passportMRZ" and "visaMRZ" (similarly, "onVINRead" is only used with either "VIN" or "VIN_NA"). It is triggered each time the SDK has identified and finished the recognition of a MRZ zone. The `results` object contains 2 or 3 lines of text results corresponding to the 2 or 3 lines in the MRZ. In this example, we simply print the results to the browser console.
133+
* `onMRZRead`: This event is only used with one of the templates "MRZ", "passportMRZ", "visaMRZ" and "idcardMRZ" (similarly, "onVINRead" is only used with either "VIN" or "VIN_NA"). It is triggered each time the SDK has identified and finished the recognition of a MRZ zone. The `results` object contains 2 or 3 lines of text results corresponding to the 2 or 3 lines in the MRZ. In this example, we simply print the results to the browser console.
134134

135135
> The events `onImageRead` and `onUniqueRead` are used in the code but they are not required. You can compare the results returned in the 3 events and see what the differences are.
136136
@@ -158,7 +158,7 @@ If the test doesn't go as expected, you can [contact us](https://www.dynamsoft.c
158158

159159
### Check out the official sample for MRZ reading
160160

161-
You can also try the official sample for MRZ reading ([test in Github](https://dynamsoft.github.io/label-recognizer-javascript-samples/2.use-case/2.mrz-read-and-parse/) or [check the code](https://github.com/Dynamsoft/label-recognizer-javascript-samples/tree/main/2.use-case/2.mrz-read-and-parse)). This sample also demonstrates how to parse the MRZ text into meaningful fields.
161+
You can also try the official sample for MRZ reading ([test in Github](https://dynamsoft.github.io/label-recognizer-javascript-samples/use-case/mrz-read-and-parse/) or [check the code](https://github.com/Dynamsoft/label-recognizer-javascript-samples/tree/main/use-case/mrz-read-and-parse)). This sample also demonstrates how to parse the MRZ text into meaningful fields.
162162

163163
## Building your own page
164164

@@ -173,15 +173,15 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde
173173
* jsDelivr
174174

175175
```html
176-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-label-recognizer@2.2.11/dist/dlr.js"></script>
177-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.0.1/dist/dce.js"></script>
176+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-label-recognizer@2.2.30/dist/dlr.js"></script>
177+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.2.0/dist/dce.js"></script>
178178
```
179179

180180
* UNPKG
181181

182182
```html
183-
<script src="https://unpkg.com/dynamsoft-label-recognizer@2.2.11/dist/dlr.js"></script>
184-
<script src="https://unpkg.com/dynamsoft-camera-enhancer@3.0.1/dist/dce.js"></script>
183+
<script src="https://unpkg.com/dynamsoft-label-recognizer@2.2.30/dist/dlr.js"></script>
184+
<script src="https://unpkg.com/dynamsoft-camera-enhancer@3.2.0/dist/dce.js"></script>
185185
```
186186

187187
#### Host the SDK yourself
@@ -193,22 +193,22 @@ To download the SDK:
193193
* yarn
194194

195195
```cmd
196-
yarn add dynamsoft-label-recognizer@2.2.11
197-
yarn add dynamsoft-camera-enhancer@3.0.1
196+
yarn add dynamsoft-label-recognizer@2.2.30
197+
yarn add dynamsoft-camera-enhancer@3.2.0
198198
```
199199

200200
* npm
201201

202202
```cmd
203-
npm install dynamsoft-label-recognizer@2.2.11
204-
npm install dynamsoft-camera-enhancer@3.0.1
203+
npm install dynamsoft-label-recognizer@2.2.30
204+
npm install dynamsoft-camera-enhancer@3.2.0
205205
```
206206

207207
Depending on how you downloaded the SDK and where you put it, you can typically include it like this:
208208

209209
```html
210-
<script src="/dlr-js-2.2.11/dist/dlr.js"></script>
211-
<script src="/dlr-js-2.2.11/dce/dist/dce.js"></script>
210+
<script src="/dynamsoft-label-recognizer-js-2.2.30/dist/dlr.js"></script>
211+
<script src="/dynamsoft-label-recognizer-js-2.2.30/dce/dist/dce.js"></script>
212212
```
213213

214214
or
@@ -245,8 +245,8 @@ If the engine files (\*.worker.js, \*.wasm.js and \*.wasm, etc.) are not in the
245245

246246
```javascript
247247
// The following code uses the jsDelivr CDN, feel free to change it to your own location of these files.
248-
Dynamsoft.DLR.LabelRecognizer.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-label-recognizer@2.2.11/dist/";
249-
Dynamsoft.DCE.CameraEnhancer.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.0.1/dist/";
248+
Dynamsoft.DLR.LabelRecognizer.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-label-recognizer@2.2.30/dist/";
249+
Dynamsoft.DCE.CameraEnhancer.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.2.0/dist/";
250250
```
251251

252252
**This configuration is usually required with frameworks like Angular or React where dlr.js is compiled into another file.**
@@ -301,7 +301,7 @@ await recognizer.setImageSource(cameraEnhancer, options);
301301

302302
#### Change the camera settings if necessary
303303

304-
In some cases, a different camera might be required instead of the default one. Also, a different resolution might work better. To change the camera or the resolution, we use the `CameraEnhancer` object. Learn more [here](https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/api-reference/camera-control.html?ver=3.0.1&utm_source=github&product=dlr&package=js).
304+
In some cases, a different camera might be required instead of the default one. Also, a different resolution might work better. To change the camera or the resolution, we use the `CameraEnhancer` object. Learn more [here](https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/api-reference/camera-control.html?ver=3.2.0&utm_source=github&product=dlr&package=js).
305305

306306
```javascript
307307
// The following lines set which camera and what resolution to use.
@@ -450,7 +450,7 @@ await recognizer.startScanning(true);
450450
## API Documentation
451451

452452
You can check out the detailed documentation about the APIs of the SDK at
453-
[https://www.dynamsoft.com/label-recognition/docs/programming/javascript/api-reference/?ver=2.2.11&utm_source=github&product=dlr&package=js](https://www.dynamsoft.com/label-recognition/docs/programming/javascript/api-reference/?ver=2.2.11&utm_source=github&product=dlr&package=js).
453+
[https://www.dynamsoft.com/label-recognition/docs/programming/javascript/api-reference/?ver=2.2.30&utm_source=github&product=dlr&package=js](https://www.dynamsoft.com/label-recognition/docs/programming/javascript/api-reference/?ver=2.2.30&utm_source=github&product=dlr&package=js).
454454

455455
## System Requirements
456456

@@ -471,7 +471,7 @@ DLR requires the following features to work:
471471

472472
* `MediaDevices`/`getUserMedia`
473473

474-
This API is only required for in-browser video streaming. If a browser does not support this API, the [Single Frame Mode](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/BarcodeScanner.html?ver=9.2.12&utm_source=github#singleframemode) will be used automatically. If the API exists but doesn't work correctly, the Single Frame Mode can be used as an alternative way to access the camera.
474+
This API is only required for in-browser video streaming.
475475

476476
* `getSettings`
477477

@@ -496,7 +496,7 @@ Apart from the browsers, the operating systems may impose some limitations of th
496496

497497
## Release Notes
498498

499-
Learn about what are included in each release at [https://www.dynamsoft.com/label-recognition/docs/programming/javascript/release-notes/?ver=latest](https://www.dynamsoft.com/label-recognition/docs/programming/javascript/release-notes/?ver=latest).
499+
Learn about what are included in each release at [https://www.dynamsoft.com/label-recognition/docs/web/programming/javascript/release-notes/?ver=latest](https://www.dynamsoft.com/label-recognition/docs/web/programming/javascript/release-notes/?ver=latest).
500500

501501
## Next Steps
502502

dist/Number/Number.data

6 Bytes
Binary file not shown.

dist/dlr-2.2.11.browser.worker.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

dist/dlr-2.2.11.wasm

-3.29 MB
Binary file not shown.

dist/dlr-2.2.30.browser.worker.js

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dlr-2.2.30.wasm

3.31 MB
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)