Skip to content

Commit 3d1a21a

Browse files
Enhance zip guide with system requirements, browser compatibility, quick start instructions, and API options
1 parent 5169263 commit 3d1a21a

1 file changed

Lines changed: 119 additions & 13 deletions

File tree

programming/javascript/user-guide/zip-guide.md

Lines changed: 119 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,71 @@ Welcome! This package contains all resource files related to **Dynamsoft Barcode
44

55
---
66

7+
## System Requirements
8+
9+
### Secure Context (HTTPS Deployment)
10+
11+
When deploying your application / website for production, make sure to serve it via a secure HTTPS connection. This is required for two reasons:
12+
13+
- Access to the camera video stream is only granted in a security context. Most browsers impose this restriction.
14+
15+
> Some browsers like Chrome may grant the access for `http://127.0.0.1` and `http://localhost` or even for pages opened directly from the local disk (`file:///...`). This can be helpful for temporary development and test.
16+
17+
- Dynamsoft License requires a secure context to work.
18+
19+
### Browser Compatibility
20+
21+
The following table is a list of supported browsers based on the above requirements:
22+
23+
| Browser Name | Version |
24+
| :----------: | :--------------: |
25+
| Chrome | v78+<sup>1</sup> |
26+
| Firefox | v68+<sup>1</sup> |
27+
| Edge | v79+ |
28+
| Safari | v14.5+ |
29+
30+
<sup>1</sup> devices running iOS needs to be on iOS 14.5+ for camera video streaming to work in Chrome, Firefox or other Apps using webviews.
31+
32+
Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDK.
33+
34+
---
35+
36+
## License
37+
38+
Dynamsoft provides a complimentary trial license for the SDK. When you download the SDK package from the Dynamsoft website, after creating a Dynamsoft account, the following license will have a 30-day free trial:
39+
40+
`DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9`
41+
42+
>[!IMPORTANT]
43+
> Once your trial license expires, the SDK will throw an error and cease to function. You can visit the Dynamsoft Customer Portal (https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=installer&package=js) to view your trial license details. Additionally, it's possible to extend the trial period via the customer portal, allowing for a total trial duration of 60 days.
44+
45+
---
46+
47+
## Quick Start
48+
49+
1. Create a new text file in the same directory as this file
50+
2. Copy the code below into the file
51+
3. Rename the file extension to `.html` and save it
52+
53+
Double-click the file to open it in your browser, you'll instantly see a fully functional web application that scans a single barcode using your device's camera!
54+
55+
```html
56+
<!DOCTYPE html>
57+
<html>
58+
<head>
59+
<title>Barcode Scanner</title>
60+
<script src="./dist/dbr.bundle.js"></script>
61+
</head>
62+
<body>
63+
<script>
64+
// You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.
65+
// Note that if you downloaded this sample from Dynamsoft while logged in, the license key below may already be your own 30-day trial license.
66+
new Dynamsoft.BarcodeScanner({license:"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"}).launch().then(result=>alert(result.barcodeResults[0].text));
67+
</script>
68+
</body>
69+
</html>
70+
```
71+
772
## How to Run the Samples
873

974
### 1. Unzip the Sample Files
@@ -12,7 +77,7 @@ After unzipping, you should see two folders: `dist`, which contains all the Barc
1277

1378
### 2. Open the Samples in a Browser
1479

15-
To explore the full set of available samples, open the `index.html` file in your browser.
80+
To explore the full set of available samples, open the `samples/index.html` file in your browser.
1681

1782
>[!IMPORTANT]
1883
> Some browsers block local file access for security reasons. To avoid these restrictions, run the samples through a local web server.
@@ -48,8 +113,53 @@ Here are a couple of easy ways to start one:
48113

49114
## Sample Folders
50115

51-
- `frameworks/` - This directory contains framework-specific examples demonstrating how to integrate the Dynamsoft Barcode Reader (JavaScript edition) into common web and hybrid frameworks. Each framework folder contains one or more runnable sub-examples (for example, scan-using-foundational-api and/or scan-using-rtu-api) showing practical integration patterns.
52-
- `scenarios/` - This directory contains focused scenario samples that show common real-world uses of the Dynamsoft Barcode Reader (JavaScript edition).
116+
The package includes two main sample directories:
117+
118+
- **`frameworks/`** - Framework-specific examples demonstrating how to integrate the Dynamsoft Barcode Reader into common web and hybrid frameworks. Each framework folder contains one or more runnable sub-examples (such as `scan-using-foundational-api` and/or `scan-using-rtu-api`) showing practical integration patterns.
119+
120+
- **`scenarios/`** - Focused scenario samples that show common real-world uses of the Dynamsoft Barcode Reader.
121+
122+
---
123+
124+
## Choosing an API
125+
126+
The SDK provides two approaches for integrating barcode scanning capabilities:
127+
128+
### RTU API (BarcodeScanner)
129+
130+
The RTU API offers the quickest path to a working barcode scanner(**Recommended for most users**):
131+
132+
- **One-line integration** – Launch a full scanner with a single API call
133+
- **Built-in UI** – Pre-designed viewfinder and scan region highlighting
134+
- **Simple configuration** – Customize behavior through intuitive config objects
135+
136+
### Foundational APIs
137+
138+
If you are looking for a fully customizable barcode decoding library with complete control over the scanning process and UI, you are welcome to use the Foundational APIs.
139+
140+
---
141+
142+
## Self-Hosting Resources
143+
144+
If you prefer to host the SDK resources on your own server instead of using a CDN:
145+
146+
1. Copy the `dist` folder to your server
147+
2. Include the script in your HTML:
148+
149+
```html
150+
<!-- Adjust the path based on where you host the dist folder -->
151+
<script src="assets/dynamsoft-barcode-reader/dist/dbr.bundle.js"></script>
152+
```
153+
154+
3. Define the resource paths in your code:
155+
156+
```ts
157+
engineResourcePaths: {
158+
rootDirectory: "https://cdn.jsdelivr.net/npm/",
159+
}
160+
```
161+
162+
---
53163

54164
## Documentation
55165

@@ -58,18 +168,14 @@ For API reference and more advanced usage, visit:
58168
- [Barcode Scanner API Docs](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html)
59169
- [Foundational API Docs](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/index.html)
60170

61-
---
171+
For more information about the resource files in the `dist/` directory, please refer to:
62172

63-
## License
64-
65-
Dynamsoft provides a complimentary trial license for the SDK. When you download the SDK package from the Dynamsoft website, after creating a Dynamsoft account, the following license will have a 30-day free trial:
173+
- [What’s in the dist folder of dynamsoft-barcode-reader-bundle](https://www.dynamsoft.com/faq/barcode-reader/web/capabilities/what-is-in-the-dist-folder-of-dbr.html)
66174

67-
`DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9`
68-
69-
You can visit the Dynamsoft Customer Portal (https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=installer&package=js) to view your trial license details. Additionally, it's possible to extend the trial period via the customer portal, allowing for a total trial duration of 60 days.
175+
---
70176

71-
## Contact
177+
## Support
72178

73-
If you run into any issues, please feel free to contact us at `support@dynamsoft.com`.
179+
If you run into any issues, please feel free to contact us at support@dynamsoft.com.
74180

75-
Copyright © Dynamsoft Corporation. All rights reserved.
181+
Copyright Dynamsoft Corporation. All rights reserved.

0 commit comments

Comments
 (0)