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
// engineResourcePaths typically is only assigned when using a framework like React/Angular/Vue where the resources are not in the same location as the script reference.
# Build a Web-Based Barcode Scanner Using Just a Few Lines of JavaScript
12
12
13
13
<!-- Don't forget to add the TOC & update license section, which is useful for npm README.-->
14
-
<!--- [Build a Web-Based Barcode Scanner Using Just a Few Lines of JavaScript](#build-a-web-based-barcode-scanner-using-just-a-few-lines-of-javascript)
14
+
-[Build a Web-Based Barcode Scanner Using Just a Few Lines of JavaScript](#build-a-web-based-barcode-scanner-using-just-a-few-lines-of-javascript)
15
15
-[License](#license)
16
16
-[Quick Start: Hello World Example](#quick-start-hello-world-example)
17
17
-[Step 1: Setting up the HTML and Including the Barcode Scanner](#step-1-setting-up-the-html-and-including-the-barcode-scanner)
18
18
-[Step 2: Initializing the Barcode Scanner](#step-2-initializing-the-barcode-scanner)
19
19
-[Step 3: Launching the Barcode Scanner](#step-3-launching-the-barcode-scanner)
20
-
- [Next Steps](#next-steps)-->
20
+
-[Next Steps](#next-steps)
21
21
22
22
This user guide provides a step-by-step walkthrough of a "Hello World" web application using the `BarcodeScanner` JavaScript Edition.
23
23
@@ -54,19 +54,19 @@ new Dynamsoft.BarcodeScanner().launch().then(result=>alert(result.barcodeResults
54
54
55
55
## License
56
56
57
-
<!--When getting started with Barcode Scanner, we recommend [getting your own 30-day trial license](https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&utm_source=guide&package=js)-->
57
+
When getting started with Barcode Scanner, we recommend [getting your own 30-day trial license](https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&utm_source=guide&package=js)
58
58
59
-
When getting started with Barcode Scanner, we recommend getting your own 30-day trial license.
59
+
<!--When getting started with Barcode Scanner, we recommend getting your own 30-day trial license.
<atarget="_blank"href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.2.20/barcode-scanner-api-samples/scan-single-barcode/hello-world.html"title="Code in Github"style="text-decoration:none;">
90
+
<atarget="_blank"href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.2.40/barcode-scanner-api-samples/scan-single-barcode/hello-world.html"title="Code in Github"style="text-decoration:none;">
91
91
<img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg" alt="Code in Github" width="20" height="20" style="width:20px;height:20px;">
92
92
</a>
93
93
94
94
<atarget="_blank"href="https://jsfiddle.net/DynamsoftTeam/gcqjf5r7/"title="Run via JSFiddle"style="text-decoration:none;">
95
95
<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;" >
96
96
</a>
97
97
98
-
<atarget="_blank"href="https://demo.dynamsoft.com/Samples/DBR/JS/barcode-scanner-api-samples/scan-single-barcode/hello-world.html?ver=11.2.20&utm_source=guide"title="Run in Dynamsoft"style="text-decoration:none;">
98
+
<atarget="_blank"href="https://demo.dynamsoft.com/Samples/DBR/JS/barcode-scanner-api-samples/scan-single-barcode/hello-world.html?ver=11.2.40&utm_source=guide"title="Run in Dynamsoft"style="text-decoration:none;">
99
99
<img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/svgs/solid/circle-play.svg" alt="Run in Dynamsoft" width="20" height="20" style="width:20px;height:20px;">
100
100
</a>
101
101
</p>
102
102
103
103
### Step 1: Setting up the HTML and Including the Barcode Scanner
104
104
105
-
As outlined earlier, this guide will help you create a simple Hello World barcode scanning application using vanilla JavaScript. The full sample code is also available in the [GitHub repository](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v11.2.20).
105
+
As outlined earlier, this guide will help you create a simple Hello World barcode scanning application using vanilla JavaScript. The full sample code is also available in the [GitHub repository](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v11.2.40).
106
106
107
107
The first step before writing the code is to include the SDK in your application. You can simply include the SDK by using the precompiled script.
When using a framework such as **React**, **Vue** or **Angular**, we recommend adding the package as a dependency using a package manager such as **npm** or **yarn**:
When using package managers like **npm** or **yarn**, you likely need to specify the location of the engine files as a link to a CDN. Please see the [BarcodeScannerConfig API](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html#barcodescannerconfig) for a code snippet on how to set the `engineResourcePaths`.
@@ -154,14 +154,14 @@ Alternatively, you may choose to download the SDK and host the files on your own
@@ -228,5 +228,5 @@ Now that the Barcode Scanner has been initialized and configured, it is ready to
228
228
Now that you've implemented the basic functionality, here are some recommended next steps to further explore the capabilities of the Barcode Scanner:
229
229
230
230
1. Learn how to [Customize the Barcode Scanner](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/barcode-scanner-customization.html)
231
-
2. Check out the [Official Samples and Demo](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/index.html?ver=11.2.2000)
232
-
3. Learn about the [APIs of BarcodeScanner](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html?ver=11.2.2000)
231
+
2. Check out the [Official Samples and Demo](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/index.html?ver=11.2.4000)
232
+
3. Learn about the [APIs of BarcodeScanner](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html?ver=11.2.4000)
0 commit comments