Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This class defines common functionality in the `BarcodeReader` module. At presen
* [DecodedBarcodesUnit](./interfaces/decoded-barcodes-unit.md)
* [DeformationResistedBarcode](./interfaces/deformation-resisted-barcode.md)
* [DeformationResistedBarcodeImageUnit](./interfaces/deformation-resisted-barcode-image-unit.md)
* [ECI-segment](./interfaces/eci-segment.md)
* [ECISegment](./interfaces/eci-segment.md)
* [ExtendedBarcodeResult](./interfaces/extended-barcode-result.md)
* [LocalizedBarcodeElement](./interfaces/localized-barcode-element.md)
* [LocalizedBarcodesUnit](./interfaces/localized-barcodes-unit.md)
Expand Down
1 change: 1 addition & 0 deletions programming/javascript/api-reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ noTitleIndex: true
* [DecodedBarcodesUnit](./interfaces/decoded-barcodes-unit.html)
* [DeformationResistedBarcode](./interfaces/deformation-resisted-barcode.html)
* [DeformationResistedBarcodeImageUnit](./interfaces/deformation-resisted-barcode-image-unit.html)
* [ECISegment](./interfaces/eci-segment.html)
* [ExtendedBarcodeResult](./interfaces/extended-barcode-result.html)
* [LocalizedBarcodeElement](./interfaces/localized-barcode-element.html)
* [LocalizedBarcodesUnit](./interfaces/localized-barcodes-unit.html)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ interface DeformationResistedBarcode {
}
```

## Formats
## format

Possible formats of the localized barcode.

```typescript
Formats: EnumBarcodeFormat;
format: EnumBarcodeFormat;
```

**See also**
Expand Down

This file was deleted.

65 changes: 65 additions & 0 deletions programming/javascript/migrate-from-v10/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ needAutoGenerateSidebar: true

# How to Upgrade DBR-JS from v10.x to v11.x

> For a full list of changes introduced in v11, see the [v11 Release Notes](../release-notes/js-11.html).

> [!IMPORTANT]
> **We strongly recommend upgrading to v11.x.** All future algorithm improvements, performance optimizations, and new features will be developed exclusively for v11 and later versions. Version 10.x and earlier will only receive critical bug fixes and will not benefit from ongoing innovation.

Expand Down Expand Up @@ -69,6 +71,69 @@ Dynamsoft.Core.CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdel
>
> Eliminate any redundant configuration of `engineResourcePaths`.

#### ImageIO / ImageProcessor / ImageDrawer Methods Are Now Static

All methods under the `ImageIO`, `ImageProcessor`, and `ImageDrawer` classes have been converted from instance methods to static methods. Update any instance-based calls accordingly:

```javascript
// v10 - instance method
const processor = new Dynamsoft.Utility.ImageProcessor();
const result = await processor.convertToBinaryLocal(imageData);

// v11 - static method
const result = await Dynamsoft.Utility.ImageProcessor.convertToBinaryLocal(imageData);
```

#### CodeParserModule.loadSpec() Now Returns a Promise

`CodeParserModule.loadSpec()` previously returned `void`. In v11, it returns `Promise<ErrorInfo>`, allowing you to detect and handle spec loading failures:

```javascript
// v10 - no return value
CodeParserModule.loadSpec("AAMVA_DL_ID");

// v11 - handle errors
const errorInfo = await CodeParserModule.loadSpec("AAMVA_DL_ID");
if (errorInfo.errorCode !== 0) {
console.error("Spec load failed:", errorInfo.errorMessage);
}
```

#### Parser Resource Files Changed to .data Format

Starting from v11.4.2000, Code parser specification files have been consolidated into `.data` files, one per code type, for improved security and simplified distribution. This affects both the resource files themselves and the string passed to `loadSpec()`.

**`loadSpec()` argument update**: Sub-type strings are now merged into their parent type name. Old strings remain supported via a JavaScript-layer mapping, but updating to the new names is recommended:

| v10 `loadSpec()` call | v11 `loadSpec()` call |
| --- | --- |
| `loadSpec("MRTD_TD3_PASSPORT")` | `loadSpec("MRTD")` |
| `loadSpec("MRTD_TD1_ID")` | `loadSpec("MRTD")` |
| `loadSpec("MRTD_TD2_ID")` | `loadSpec("MRTD")` |
| `loadSpec("AAMVA_DL_ID")` | `loadSpec("AAMVA_DL_ID")` |
| `loadSpec("AAMVA_DL_ID_WITH_MAG_STRIPE")` | `loadSpec("AAMVA_DL_ID")` |

```javascript
// before v11.4.2000
Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD_TD3_PASSPORT");
Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD_TD1_ID");
Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD_TD2_ID");

// now (recommended)
Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD");
```

**Self-hosted resource files**: If you host these files yourself, replace the old `.data` & `_Map.text` files with the new `.data` equivalents:

| Old File | New File |
| --- | --- |
| `AADHAAR.json` | `AADHAAR.data` |
| `AAMVA_DL_ID.json` | `AAMVA_DL_ID.data` |
| `GS1_AI.json` | `GS1_AI.data` |
| `MRTD.json` | `MRTD.data` |
| `SOUTH_AFRICA_DL.json` | `SOUTH_AFRICA_DL.data` |
| `VIN.json` | `VIN.data` |

### Upgrade your template

The template system has been enhanced in v11 to support more powerful customization options and better performance. Templates from v10.x are not directly compatible with v11.
Expand Down
1 change: 1 addition & 0 deletions programming/javascript/user-guide/use-in-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ To complete the code, we'll include the [`CaptureVisionRouter`](https://www.dyna
import "../dynamsoft.config";
import { CameraEnhancer, CameraView } from "dynamsoft-camera-enhancer";
import { CaptureVisionRouter } from "dynamsoft-capture-vision-router";
import { MultiFrameResultCrossFilter } from "dynamsoft-utility";

let cameraEnhancer;
let pCameraEnhancer; // promise of cameraEnhancer
Expand Down
Loading