You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.NODE.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Dynamsoft JavaScript Barcode SDK for Node
2
2
3
-
> This library is the Node.js edition of Dynamsoft Barcode Reader. If you are looking to implement barcode reading feature in a web page, please check out the other library [Dynamsoft JavaScript Barcode SDK for Web](https://github.com/dynamsoft-dbr/javascript-barcode/).
3
+
> This library is the Node.js edition of Dynamsoft Barcode Reader. If you are looking to implement barcode reading feature in a web page, please check out the other library [Dynamsoft JavaScript Barcode SDK for Web](https://github.com/dynamsoft-dbr/javascript-barcode/?utm_source=github&package=js).
4
4
5
-
Both 1D and 2D barcode symbiology are supported including the popular `Code 39`, `EAN-13`, `QR`, `PDF417`, etc.+ Find the full list [here](https://www.dynamsoft.com/Products/Dynamic-Barcode-Reader.aspx).
5
+
Both 1D and 2D barcode symbiology are supported including the popular `Code 39`, `EAN-13`, `QR`, `PDF417`, etc.+ Find the full list [here](https://www.dynamsoft.com/barcode-reader/overview/?utm_source=github&package=js).
6
6
7
7
The library is based on `webassembly` which has been an official feature of Node.js since `LTS 8`. If you are using Node.js LTS 8 and have no plan to upgrade it, check out [how to use the library in Node.js LTS 8](#how-to-use-the-library-in-nodejs-lts-8). That said, Node.js version >= LTS 12 is recommended because the library will try to use `worker_threads` when decoding.
8
8
@@ -62,9 +62,9 @@ let results = await reader.decode('https://demo.dynamsoft.com/barcode-reader/img
62
62
> **NOTE**
63
63
> The following image formats are supported by default: `png`, `jpg`, `bmp`, `gif`.
64
64
>
65
-
> If you want to decode other files like `pdf`'s, you need to convert them to images first. Contact [Dynamsoft Support](https://www.dynamsoft.com/Company/Contact.aspx) to find out more.
65
+
> If you want to decode other files like `pdf`'s, you need to convert them to images first. Contact [Dynamsoft Support](https://www.dynamsoft.com/company/contact/?utm_source=github&package=js) to find out more.
66
66
>
67
-
> If you want to decode raw image data (`RGBA`) from sources like a camera. You can use the API `deocdeBuffer`. Check out [C++ API decodeBuffer](https://www.dynamsoft.com/barcode-reader/programming/cplusplus/api-reference/cbarcodereader-methods/decode.html?ver=latest#decodebuffer) for more details.
67
+
> If you want to decode raw image data (`RGBA`) from sources like a camera. You can use the API `deocdeBuffer`. Check out [C++ API decodeBuffer](https://www.dynamsoft.com/barcode-reader/programming/cplusplus/api-reference/cbarcodereader-methods/decode.html?ver=latest&utm_source=github&package=js#decodebuffer) for more details.
68
68
69
69
* Print out the results
70
70
@@ -80,7 +80,7 @@ for(let result of results){
80
80
> node your-code.js
81
81
```
82
82
83
-
Last not but least, don't forget to set a `productKey`! If you don't have a key yet, click [here](https://www.dynamsoft.com/customer/license/trialLicense) to get one.
83
+
Last not but least, don't forget to set a `productKey`! If you don't have a key yet, click [here](https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&utm_source=github&package=js) to get one.
// Please visit https://www.dynamsoft.com/customer/license/trialLicense to get a trial license
93
+
// Please visit https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&utm_source=github&package=js to get a trial license
94
94
DBR.BarcodeReader.productKeys='PRODUCT-KEYS';
95
95
96
96
(async()=>{
@@ -133,13 +133,13 @@ settings.deblurLevel = 2;
133
133
awaitreader.updateRuntimeSettings(settings);
134
134
```
135
135
136
-
See [Barcode reading settings Guide](https://www.dynamsoft.com/barcode-reader/programming/cplusplus/user-guide.html?ver=latest#use-publicruntimesettings-struct-to-change-settings) for basic usage.
136
+
See [Barcode reading settings Guide](https://www.dynamsoft.com/barcode-reader/programming/cplusplus/user-guide.html?ver=latest#use-publicruntimesettings-struct-to-change-settings?utm_source=github&package=js) for basic usage.
137
137
138
-
See [C++ API RuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html) for more details.
138
+
See [C++ API RuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html?utm_source=github&package=js) for more details.
139
139
140
-
To find out which settings best suit your usage scenario, visit [DBR Main Online Demo](https://demo.dynamsoft.com/dbr/barcodereaderdemo.aspx).
140
+
To find out which settings best suit your usage scenario, visit [DBR Main Online Demo](https://demo.dynamsoft.com/barcode-reader/?utm_source=github&package=js).
141
141
142
-
Any questions, please contact [Dynamsoft support](https://www.dynamsoft.com/Company/Contact.aspx).
142
+
Any questions, please contact [Dynamsoft support](https://www.dynamsoft.com/company/contact/?utm_source=github&package=js).
[Dynamsoft JavaScript Barcode SDK](https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx) is a JavaScript library for barcode scanning based on the **WebAssembly** technology. It supports real-time localization and decoding of various barcode types. The library is capable of scanning barcodes from static images as well as directly from live video streams. It also supports reading multiple barcodes at once.
10
+
[Dynamsoft JavaScript Barcode SDK](https://www.dynamsoft.com/barcode-reader/sdk-javascript/?utm_source=github&package=js) is a JavaScript library for barcode scanning based on the **WebAssembly** technology. It supports real-time localization and decoding of various barcode types. The library is capable of scanning barcodes from static images as well as directly from live video streams. It also supports reading multiple barcodes at once.
11
11
12
12
> Also see [Dynamsoft JavaScript Barcode SDK for Node](https://github.com/Dynamsoft/javascript-barcode/blob/master/README.NODE.md).
Please visit [https://www.dynamsoft.com/customer/license/trialLicense](https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&utm_source=github&package=js) to get a valid license and update `PRODUCT-KEYS`:
* Unlike typical server-based applications, this library requires some advanced features which fortunately are supported by all mainstream modern browsers. These advanced features are listed below:
* Required only for in-browser video streaming. If a browser doesn't have this API the [Single Frame Mode](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/BarcodeScanner/accessors.html?ver=latest#singleframemode) is used automatically. If the API exists but doesn't work correctly, [Single Frame Mode](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/BarcodeScanner/accessors.html?ver=latest#singleframemode) can be used as an alternative.
132
+
* Required only for in-browser video streaming. If a browser doesn't have this API the [Single Frame Mode](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/BarcodeScanner/accessors.html?ver=latest&utm_source=github&package=js#singleframemode) is used automatically. If the API exists but doesn't work correctly, [Single Frame Mode](https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/BarcodeScanner/accessors.html?ver=latest&utm_source=github&package=js#singleframemode) can be used as an alternative.
* These four features are required for the library to work.
135
135
@@ -208,15 +208,15 @@ This section will help you use the library to build a simple web application to
208
208
209
209
Create an HTML file with the following content. Deploy this to your web server and run the application over **HTTPS**.
210
210
211
-
* You will need to replace <code>PRODUCT-KEYS</code> with a trial key for the sample code to work correctly. You can acquire a trial key [here](https://www.dynamsoft.com/customer/license/trialLicense).
211
+
* You will need to replace <code>PRODUCT-KEYS</code> with a trial key for the sample code to work correctly. You can acquire a trial key [here](https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&utm_source=github&package=js).
212
212
* If you don't have a ready-to-use web server and you happen to have a package manager like `npm` or `yarn`, you can set up a simple http server in minutes. Check out http-server on [npm](https://www.npmjs.com/package/http-server) or [yarn](https://yarnpkg.com/en/package/http-server).
213
213
214
214
```html
215
215
<!DOCTYPE html>
216
216
<html>
217
217
<body>
218
-
<!-- Please visit https://www.dynamsoft.com/customer/license/trialLicense to get a trial license. -->
> **NOTE**: : Since we do change the library a bit in each release, to make sure your application doesn't get interrupted by automatic updates, use a specific version in your production environment, as shown above. Using a general major version like `@7` is not recommended.
As you can see in the code, there are three categories of configurations.
385
385
386
386
*`get/updateVideoSettings`: Configures the data source, i.e., the video stream. These settings include which camera to use, the resolution, etc.. Learn more [here](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Syntax).
387
-
*`get/updateRuntimeSettings`: Configures the decode engine. Find a full list of these settings and their corresponding descriptions [here](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html?ver=latest).
387
+
*`get/updateRuntimeSettings`: Configures the decode engine. Find a full list of these settings and their corresponding descriptions [here](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html?ver=latest&utm_source=github&package=js).
388
388
[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/h3o4kfau/)
389
389
390
390
e.g.
@@ -410,13 +410,13 @@ As you can see in the code, there are three categories of configurations.
410
410
awaitscanner.updateRuntimeSettings(settings);
411
411
```
412
412
413
-
See [Barcode reading settings Guide](https://www.dynamsoft.com/barcode-reader/programming/cplusplus/user-guide.html?ver=latest#use-publicruntimesettings-struct-to-change-settings) for basic usage.
413
+
See [Barcode reading settings Guide](https://www.dynamsoft.com/barcode-reader/programming/cplusplus/user-guide.html?ver=latest&utm_source=github&package=js#use-publicruntimesettings-struct-to-change-settings) for basic usage.
414
414
415
-
See [C++ API RuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html) for more details.
415
+
See [C++ API RuntimeSettings](https://www.dynamsoft.com/barcode-reader/programming/c-cplusplus/struct/PublicRuntimeSettings.html?utm_source=github&package=js) for more details.
416
416
417
-
To find out which settings best suit your usage scenario, visit [DBR Main Online Demo](https://demo.dynamsoft.com/barcode-reader/).
417
+
To find out which settings best suit your usage scenario, visit [DBR Main Online Demo](https://demo.dynamsoft.com/barcode-reader/?utm_source=github&package=js).
418
418
419
-
Any questions, please contact [Dynamsoft support](https://www.dynamsoft.com/Company/Contact.aspx).
419
+
Any questions, please contact [Dynamsoft support](https://www.dynamsoft.com/Company/Contact.aspx?utm_source=github&package=js).
420
420
421
421
*`get/updateScanSettings`: Configures the behavior of the scanner which includes `duplicateForgetTime`, `intervalTime`, etc.
422
422
@@ -439,8 +439,8 @@ The following introduces the 3rd way. Check out the following code on how it's d
[From v7x to v8x](https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/upgrade.html?ver=latest#from-v7x-to-v8x&utm_source=github&package=js)
0 commit comments