Skip to content

Commit 4b12811

Browse files
update to internal commit d4f2d79c
1 parent 97d3b01 commit 4b12811

File tree

13 files changed

+257
-111
lines changed

13 files changed

+257
-111
lines changed

programming/javascript/api-reference/barcode-scanner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ interface BarcodeScannerConfig {
178178
// 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.
179179
engineResourcePaths: {rootDirectory:"https://cdn.jsdelivr.net/npm/"},
180180
// path to the UI file
181-
uiPath: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.0.6000/dist/ui/barcode-scanner.ui.xml",
181+
uiPath: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.2.2000/dist/ui/barcode-scanner.ui.xml",
182182
barcodeFormats: [Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE , Dynamsoft.DBR.EnumBarcodeFormat.BF_CODE_128],
183183
showPoweredByDynamsoft: false,
184184
duplicateForgetTime: 3000,

programming/javascript/api-reference/enum-localization-mode.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,31 @@ codeAutoHeight: true
2020
>
2121
```javascript
2222
enum EnumLocalizationMode {
23-
/** Omits the localization process entirely. */
24-
LM_SKIP = 0x00,
2523
/** Automatic localization mode selection; not yet implemented. */
26-
LM_AUTO = 0x01,
24+
LM_AUTO = 1,
2725
/** Identifies barcodes by finding connected blocks, offering optimal results, especially recommended for highest priority in most scenarios. */
28-
LM_CONNECTED_BLOCKS = 0x02,
26+
LM_CONNECTED_BLOCKS = 2,
2927
/** Detects barcodes through analysis of patterns of contiguous black and white regions, tailored for QR Codes and DataMatrix codes. */
30-
LM_STATISTICS = 0x04,
28+
LM_STATISTICS = 4,
3129
/** Locates barcodes by identifying linear patterns, designed primarily for 1D barcodes and PDF417 codes. */
32-
LM_LINES = 0x08,
30+
LM_LINES = 8,
3331
/** Provides rapid barcode localization, suited for interactive applications where speed is crucial. */
34-
LM_SCAN_DIRECTLY = 0x10,
32+
LM_SCAN_DIRECTLY = 16,
3533
/** Targets barcode localization through detection of specific mark groups, optimized for Direct Part Marking (DPM) codes. */
36-
LM_STATISTICS_MARKS = 0x20,
34+
LM_STATISTICS_MARKS = 32,
3735
/** Combines methods of locating connected blocks and linear patterns to efficiently localize postal codes. */
38-
LM_STATISTICS_POSTAL_CODE = 0x40,
36+
LM_STATISTICS_POSTAL_CODE = 64,
3937
/** Initiates barcode localization from the image center, facilitating faster detection in certain layouts. */
40-
LM_CENTRE = 0x80,
38+
LM_CENTRE = 128,
4139
/** Specialized for quick localization of 1D barcodes, enhancing performance in fast-scan scenarios. */
42-
LM_ONED_FAST_SCAN = 0x100,
43-
/** Placeholder value with no functional meaning. */
44-
LM_END=0xFFFFFFFF,
40+
LM_ONED_FAST_SCAN = 256,
41+
/**Localizes barcodes by utilizing a neural network model. Introduced in Dynamsoft Barcode Reader Bundle version 11.2.2000. */
42+
LM_NEURAL_NETWORK = 512,
4543
/** Reserved for future use in localization mode settings. */
46-
LM_REV = -2147483648
44+
LM_REV = -2147483648,
45+
/** Omits the localization process entirely. */
46+
LM_SKIP = 0,
47+
/** Placeholder value with no functional meaning. */
48+
LM_END = -1
4749
}
4850
```
49.9 KB
Loading
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
layout: default-layout
3+
title: About Adaptive WebAssembly (Wasm) Loading
4+
keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, tech basic, wasm, loading
5+
description: How to enable -SIMD-Pthread Wasm for accelerated deep learning computation?
6+
needAutoGenerateSidebar: false
7+
---
8+
9+
# About Adaptive WebAssembly (Wasm) Loading
10+
11+
## What is adaptive Wasm loading?
12+
13+
Dynamsoft Barcode Reader(JavaScript) includes **three optimized WebAssembly (Wasm) variants***-Baseline*, *-Pthread*, and *-SIMD-Pthread* — which can be **dynamically loaded based on the runtime environment**.
14+
This adaptive loading mechanism ensures the SDK automatically selects the **most compatible and highest-performing** Wasm module available in each browser, further improving performance in modern environments.
15+
16+
---
17+
18+
## Comparison of the three Wasm variants
19+
20+
| Feature | Baseline Wasm | SIMD Wasm | SIMD + Pthread Wasm |
21+
| -------- | -------------- | ---------- | -------------------- |
22+
| **Parallelism** | Single-threaded | Single Instruction Multiple Data (CPU vector instruction set) | Multi-threaded(via Web Workers + SharedArrayBuffer) + SIMD |
23+
| **Performance Characteristics** | Simple, limited by single-core performance | Leverages CPU vectorized parallelism to speed up data processing | Combines SIMD vectorization and multi-core acceleration for maximum performance |
24+
| **Compatibility** | Supported in all Wasm environments | Requires browser support for Wasm SIMD instruction set | Requires browser support for both Wasm SIMD and Wasm threads (cross-origin isolation) |
25+
| **Minimum Supported Browser Versions** | Chrome 78+</br>Edge 79+</br>Safari 14.5+</br>Firefox 68+ | Chrome 91+</br>Edge 91+</br>Safari 16.4+</br>Firefox 89+ | Chrome 91+</br>Edge 91+</br>Safari 16.4+</br>Firefox 89+ |
26+
| **Wasm Size** | 5588 KB | 6974 KB | 8225 KB |
27+
28+
---
29+
30+
## How to enable -SIMD-Pthread Wasm for accelerated deep learning computation?
31+
32+
To unlock multi-threaded performance with the **-SIMD-Pthread Wasm** variant, configure your server to enable **cross-origin isolation** by adding the following HTTP headers to all responses:
33+
34+
```text
35+
Cross-Origin-Opener-Policy: same-origin
36+
Cross-Origin-Embedder-Policy: require-corp
37+
```
38+
39+
Then, ensure that all SDK resources are **served under the same origin**.
40+
41+
Once correctly configured, the SDK will automatically detect the environment and load the `-SIMD-Pthread Wasm` to leverage multi-core acceleration.
42+
43+
>[!TIP]
44+
>You can verify whether your site is correctly isolated by checking the browser console for cross-origin isolation status or by calling window.crossOriginIsolated in DevTools.
45+
46+
## How to manually specify which Wasm variant to load?
47+
48+
By default, the SDK automatically determines the most suitable WebAssembly (Wasm) variant to load based on the browser’s capabilities.
49+
However, developers can **manually override** this behavior and explicitly specify which Wasm module to load through the `wasmLoadOptions` property.
50+
51+
### Example
52+
53+
```javascript
54+
Dynamsoft.Core.CoreModule.wasmLoadOptions = {
55+
wasmType: "ml-simd-pthread",
56+
pthreadPoolSize: 5,
57+
};
58+
```
59+
60+
### Supported Wasm Types
61+
62+
```javascript
63+
type WasmType =
64+
| "baseline" // Basic single-threaded variant
65+
| "ml-simd" // SIMD-optimized variant
66+
| "ml-simd-pthread" // Multi-threaded + SIMD optimized variant
67+
| "auto"; // Automatically select based on environment
68+
```
69+
70+
>[!NOTE]
71+
>Setting wasmType to "auto" (default) allows the SDK to automatically choose the optimal Wasm based on runtime capability detection.
72+
>
73+
>When using "ml-simd-pthread", ensure that cross-origin isolation is properly configured as described in How to enable `-SIMD-Pthread Wasm` for accelerated deep learning computation.
74+
>
75+
>If the specified Wasm variant is not supported in the current browser, the SDK will gracefully fall back to a compatible variant.
76+
77+
## Why isn’t -SIMD-Pthread Wasm enabled by default on iOS?
78+
79+
Due to iOS’s strict memory allocation and management limitations, loading `-SIMD-Pthread Wasm` can sometimes lead to “out of memory” errors on older devices or iOS versions.
80+
To ensure stability and compatibility, the SDK does not load `-SIMD-Pthread Wasm` by default on iOS. Instead, it automatically falls back to the most suitable Baseline or SIMD variant depending on the environment.

programming/javascript/index.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ breadcrumbText: JavaScript
1313

1414
Dynamsoft Barcode Reader (DBR) can be used in JavaScript to add barcode reading capabilities to websites running in modern browsers. It is ideal for
1515

16-
* organizations who already have sophisticated websites and do not intend to develop mobile applications for the same purposes; or
17-
* organizations whose customers have no desire to install applications for temporary usage of their services.
16+
- organizations who already have sophisticated websites and do not intend to develop mobile applications for the same purposes; or
17+
- organizations whose customers have no desire to install applications for temporary usage of their services.
1818

1919
To get a fast start, you can
2020

21-
* read the [User Guide](user-guide/barcode-scanner.html), or
22-
* try the [Samples and Demos](samples-demos/)
21+
- read the [User Guide](user-guide/barcode-scanner.html), or
22+
- try the [Samples and Demos](samples-demos/)
2323

2424
The following describes the highlights of DBR JavaScript edition (DBR-JS) version 11.x.
2525

2626
# ✨BarcodeScanner – Simplified API and Built-in UI
2727

28-
The `BarcodeScanner` class offering a streamlined API and a prebuilt interactive UI, making barcode scanning integration easier than ever. This is now the recommended way to use DBR-JS, especially for developers who want a quick, clean, and robust scanning experience with minimal setup.
28+
The `BarcodeScanner` class offers a streamlined API and a prebuilt interactive UI, making barcode scanning integration easier than ever. This is now the recommended way to use DBR-JS, especially for developers who want a quick, clean, and robust scanning experience with minimal setup.
2929

3030
With `BarcodeScanner`, you can:
3131

32-
- Instantiate and configure the scanner with just a few lines of code;
32+
- Instantiate and configure the scanner with just a few lines of code.
3333

34-
- Select your scanning mode and present a ready-to-use scanning interface;
34+
- Select your scanning mode and present a ready-to-use scanning interface.
3535

3636
- Focus on your application logic without worrying about camera setup, UI rendering, or lifecycle management.
3737

@@ -42,11 +42,11 @@ With `BarcodeScanner`, you can:
4242

4343
## Fast Integration
4444

45-
This [JSFiddle example](https://jsfiddle.net/DynamsoftTeam/gcqjf5r7/) demonstrates all the code needed to build a web application using `BarcodeScanner`, end users of the web page can open it in a browser, access their cameras and read barcodes directly from the video input.
45+
This [JSFiddle example](https://jsfiddle.net/DynamsoftTeam/gcqjf5r7/) demonstrates all the code needed to build a web application using `BarcodeScanner`. End users of the web page can open it in a browser, access their cameras, and read barcodes directly from the video input.
4646

4747
### Camera Control
4848

49-
Customers generally need to scan a barcode on the fly at which time there is no better input than the camera hooked to or built into the device itself. As shown in the code snippet above, the product **Dynamsoft Camera Enhancer (DCE)** is used to provide camera support. It makes use of the powerful [**MediaDevices**](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices) interface (provided by the browser itself) to instantly access the video input of the camera, capture image frames and supply them to the back-end decoding engine.
49+
Customers generally need to scan a barcode on the fly at which time there is no better input than the camera hooked to or built into the device itself. As shown in the example above, the product **Dynamsoft Camera Enhancer (DCE)** is used to provide camera support. It makes use of the powerful [**MediaDevices**](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices) interface (provided by the browser itself) to instantly access the video input of the camera, capture image frames and supply them to the back-end decoding engine.
5050

5151
> DBR and DCE communicate through the interface called [Image Source Adapter]({{ site.dcvb_architecture }}input.html#image-source-adapter?lang=js).
5252
@@ -74,21 +74,21 @@ The actual use environment is unpredictable. The barcode may appear distorted, i
7474

7575
DBR does a lot of preparation work to make sure the barcode is as legible as possible for the decoding engine to read. This ensures a very high accuracy. In addition, DBR achieves even higher accuracy through the following ways:
7676

77-
* DBR can verify results by comparing the results of multiple consecutive recognitions;
78-
* DBR has a confidence score for each recognition which can be used to filter unwanted results;
79-
* DBR is also able to verify the barcode result with printed text that accompanies the barcode with the help of the product **Dynamsoft Label Recognizer (DLR)**.
77+
- DBR can verify results by comparing the results of multiple consecutive recognitions;
78+
- DBR has a confidence score for each recognition which can be used to filter unwanted results;
79+
- DBR is also able to verify the barcode result with printed text that accompanies the barcode with the help of the product **Dynamsoft Label Recognizer (DLR)**.
8080

81-
Through many experiences, DBR has also cultivated its error correction ability to handle
81+
Through extensive real-world use, DBR has also cultivated its error correction ability to handle:
8282

83-
* Non-standard barcodes which do not strictly abide by the specification;
84-
* Deformed barcodes which are usually caused by improper printing.
83+
- Non-standard barcodes which do not strictly abide by the specification;
84+
- Deformed barcodes which are usually caused by improper printing.
8585

8686
## Effortless Expansion
8787

8888
DBR-JS v11.x is based on [Dynamsoft Capture Vision]({{site.dcvb_architecture}}) which is a modular architecture. This architecture makes it easy to add new functionality or custom behavior with very little change to the code. Two examples are:
8989

90-
* Add **Dynamsoft Document Normalizer (DDN)** to do perspective correction before pass an image frame to read barcodes;
91-
* Add **Dynamsoft Code Parser (DCP)** to parse the text embedded in the PDF417 on driver's licenses.
90+
- Add **Dynamsoft Document Normalizer (DDN)** to do perspective correction before passing an image frame to read barcodes;
91+
- Add **Dynamsoft Code Parser (DCP)** to parse the text embedded in the PDF417 on driver's licenses.
9292

9393
## Next Step
9494

programming/javascript/release-notes/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ breadcrumbText: Release Notes
99

1010
# DBR JavaScript SDK - Release Notes
1111

12+
- [11.2.2000 (10/30/2025)](js-11.html#1122000-10302025)
1213
- [11.0.6000 (08/14/2025)](js-11.html#1106000-08142025)
1314
- [11.0.3000 (07/09/2025)](js-11.html#1103000-07092025)
1415
- [10.5.3000 (04/24/2025)](js-10.html#1053000-04242025)

programming/javascript/release-notes/js-11.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,69 @@ noTitleIndex: true
1010

1111
# Release Notes for Dynamsoft Barcode Reader JavaScript SDK
1212

13+
## 11.2.2000 (10/30/2025)
14+
15+
### ✨ Key Highlights
16+
#### AI-Powered Barcode Detection and Decoding
17+
18+
- New Localization Models – Introduces [`OneDLocalization`]({{ site.dcvb_parameters }}barcode-reader-task-settings/localization-modes.html#modelnamearray) and [`DataMatrixQRCodeLocalization`]({{ site.dcvb_parameters }}barcode-reader-task-settings/localization-modes.html#modelnamearray) neural network models for improved detection of **blurred / low-resolution 1D codes**, or **partially damaged DataMatrix/QR codes**.
19+
- Specialized Decoders – Adds [`EAN13Decoder`]({{ site.dcvb_parameters }}barcode-reader-task-settings/deblur-modes.html#modelnamearray) and [`Code128Decoder`]({{ site.dcvb_parameters }}barcode-reader-task-settings/deblur-modes.html#modelnamearray) models optimized for **long-distance** and **motion-blurred** decoding scenarios.
20+
- Redesigned Deblur Model – The [`OneDDeblur`]({{ site.dcvb_parameters }}barcode-reader-task-settings/deblur-modes.html#modelnamearray) model now provides more effective recovery from **motion and focus blur**.
21+
- Configurable Model Selection – The new `ModelNameArray` parameter supports flexible model loading and fine-grained control for specific barcode types.
22+
23+
#### Precision and Processing Control
24+
25+
- Enhanced Deblur Methods – [`DM_DEEP_ANALYSIS`]({{ site.dcvb_parameters }}barcode-reader-task-settings/deblur-modes.html#dm_deep_analysis) now includes sub-level control with `OneDGeneral`, `TwoDGeneral`, and `EAN13Enhanced` options.
26+
- Barcode Count Expectation – The new [`ExpectedBarcodesCount`]({{ site.dcvb_parameters }}barcode-format-specification/expected-barcodes-count.html) parameter enables **format-specific quantity control** and **early termination** in fixed-count workflows.
27+
- Improved Region Detection – The new [`RPM_GRAY_CONSISTENCY`]({{ site.dcvb_parameters }}image-parameter/region-predetection-modes.html#rpm_gray_consistency) mode provides more precise region extraction based on **grayscale uniformity** and **local consistency** for document and label processing.
28+
29+
### Performance Highlights
30+
31+
- Up to **26.5%** higher read rates under blur conditions with as much as **44%** faster processing.
32+
- Reliable decoding of DataMatrix and QR codes with missing or damaged finder patterns.
33+
- Extended operational range beyond 75 cm for long-distance barcode scanning.
34+
35+
### Developer Notes
36+
37+
- Backward Compatibility – Fully compatible with existing integrations; no code-level changes required for upgrade.
38+
- Configuration Flexibility – Expanded parameter set allows comprehensive model configuration for scenario-specific tuning.
39+
- Production Stability – All new models validated in enterprise environments.
40+
41+
#### Updates for [BarcodeScanner](https://dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html)
42+
43+
- In **single** mode, if the target barcode is not found among the candidates, there is now an opportunity to rescan.
44+
<img src="../assets/return-button.png" style="display: block; margin: 0 auto;"/>
45+
- Fixed an issue where the barcode location could be inaccurate in certain cases.
46+
- Fixed a problem where, in specific cases when the camera was occupied, the video stream could not be displayed correctly.
47+
- Other known issues fixed.
48+
49+
#### Engineering Optimizations
50+
51+
- Optimized the parallel download logic to improve resource loading speed.
52+
- Optimized [adaptive WASM loading logic](../faq/adaptive-wasm-loading.md) to further enhance performance in modern browser environments.
53+
54+
### API Changes
55+
56+
#### New
57+
58+
- Added the `switchCapturingTemplate()` method to the `CaptureVisionRouter` class to enable switching the active capturing template during the image processing workflow.
59+
- Added methods `toBlob()`, `toImage()`, and `toCanvas()` to the `originalImageResultItem` interface for flexible image data conversion.
60+
- Added the `SetGlobalIntraOpNumThreads()` method to the `CaptureVisionRouter` class to configure the global thread count for model inference.
61+
- Added the `clearDLModelBuffers()` method to the `CaptureVisionRouter` class to manually release memory occupied by loaded models.
62+
- Added callback functions `onSpecLoadProgressChanged()` and `onWasmLoadProgressChanged()` to monitor resource loading progress.
63+
- Added the `convertToContainCoordinates()` method to the `CameraEnhancer` class to convert coordinates from `fit: cover` to `fit: contain` mode.
64+
- Added the `LM_NEURAL_NETWORK` enumeration to `EnumLocalizationMode`.
65+
66+
#### Updated
67+
68+
- Changed the default value of `MaxThreadsInOneTask` from **4** to **0**.
69+
- Changed the default value of `IncludeTrailingCheckDigit` from **1** to **0**.
70+
71+
#### Deprecated
72+
73+
- Deprecated the `DeblurModelNameArray` argument in the `DeblurModes` parameter. Use `ModelNameArray` instead.
74+
- Deprecated the `appendModelBuffer()` method in the `CaptureVisionRouter` class. Use `appendDLModelBuffer()` instead.
75+
1376
## 11.0.6000 (08/14/2025)
1477

1578
### New

programming/javascript/upgrade-guide/10to11.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permalink: /programming/javascript/upgrade-guide/10to11.html
1414
To use version 11, include the following script in your HTML:
1515

1616
```html
17-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.0.6000/dist/dbr.bundle.js"></script>
17+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.2.2000/dist/dbr.bundle.js"></script>
1818
```
1919

2020
## APIs changes introduced in v11
573 Bytes
Loading

0 commit comments

Comments
 (0)