Skip to content

Commit 5ea3221

Browse files
update to internal commit 61c6f410
1 parent 89d28a4 commit 5ea3221

File tree

6 files changed

+65
-7
lines changed

6 files changed

+65
-7
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
layout: default-layout
3+
title: CodeParserModule Class - Dynamsoft Code Parser JavaScript Edition API
4+
description: This page introduces APIs related to the CodeParserModule Class of Dynamsoft Code Parser JavaScript Edition.
5+
keywords: capture vision, code parser Module, api reference, javascript, js
6+
needAutoGenerateSidebar: true
7+
needGenerateH3Content: true
8+
noTitleIndex: true
9+
---
10+
11+
# CodeParserModule Class
12+
13+
The `CodeParserModule` class is defined in the namespace `Dynamsoft.DCP`.
14+
15+
| API Name | Description |
16+
| ------------------------------------ | ----------------------------------------------------------- |
17+
| `static` [getVersion()](#getversion) | Returns the version of the `CodeParser` module. |
18+
| `static` [loadSpec()](#loadspec) | Loads the specification for a certain type of code strings. |
19+
20+
### getVersion
21+
22+
Returns the version of the `CodeParser` module.
23+
24+
```typescript
25+
static getVersion(): string;
26+
```
27+
28+
**Code snippet**
29+
30+
```javascript
31+
const version = Dynamsoft.DCP.CodeParserModule.getVersion();
32+
console.log(version);
33+
```
34+
35+
### loadSpec
36+
37+
Loads the specification for a certain type of code strings.
38+
39+
```typescript
40+
loadSpec(specificationName: string, specificationPath?: string): Promise<void>;
41+
```
42+
43+
**Parameters**
44+
45+
* `specificationName`: specifies the name of the specification.
46+
* `specificationPath`: specifies the path to find the specification file. If not specified, the method will try to load the file from the path specified for the "dcp" module in `Dynamsoft.Core.CoreModule.engineResourcePaths`. For example, if the path for the "dcp" module is "https://cdn.jsdelivr.net/npm/dynamsoft-code-parser@2.0.20/dist/", then calling `Dynamsoft.DCP.CodeParserModule.loadSpec("AADHAAR")` will load the file "AADHAAR.data" from "https://cdn.jsdelivr.net/npm/dynamsoft-code-parser@2.0.20/dist/specification/AADHAAR.data".
47+
48+
**Code Snippet**
49+
50+
```javascript
51+
await Dynamsoft.DCP.CodeParserModule.loadSpec("AADHAAR");
52+
```

programming/javascript/api-reference/code-parser-module-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ console.log(version);
3737
Loads the specification for a certain type of code strings.
3838

3939
```typescript
40-
loadSpec(specificationName: string, specificationPath?: string): Promise<void>;
40+
loadSpec(specificationName: string | Array<string>, specificationPath?: string): Promise<void>;
4141
```
4242

4343
**Parameters**

programming/javascript/api-reference/interfaces/parsed-result-item.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ interface ParsedResultItem extends Core.CapturedResultItem {
2222
}
2323
```
2424

25-
| API Name | Description |
25+
<!-- | API Name | Description |
2626
| ------------------------------------------------------- | ----------------------------------------------------------------------- |
2727
| [codeType](#codetype) | Returns the code type of the parsed result. |
2828
| [jsonString](#jsonstring) | Returns the parsed result as a JSON formatted string. |
2929
| [getFieldValue()](#getfieldvalue) | Gets the value of a specified field from the parsed result. |
3030
| [getFieldMappingStatus()](#getfieldmappingstatus) | Gets the mapping status of a specified field from the parsed result. |
31-
| [getFieldValidationStatus()](#getfieldvalidationstatus) | Gets the validation status of a specified field from the parsed result. |
31+
| [getFieldValidationStatus()](#getfieldvalidationstatus) | Gets the validation status of a specified field from the parsed result. | -->
3232

3333
## codeType
3434

programming/javascript/api-reference/interfaces/parsed-result.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ interface ParsedResult {
2424
}
2525
```
2626

27-
| API Name | Description |
27+
<!-- | API Name | Description |
2828
| ------------------------------------------- | ----------------------------------------------------------- |
2929
| [originalImageHashId](#originalimagehashid) | Returns the hash id of the original image. |
3030
| [originalImageTag](#originalimagetag) | Returns the tag of the original image. |
3131
| [parsedResultItems](#parsedresultitems) | Returns an array that contains all `ParsedResultItem`s. |
3232
| [hasItem()](#hasitem) | Checks whether the specified `ParsedResultItem` exists. |
3333
| [removeItem()](#removeitem) | Removes the specified `ParsedResultItem`. |
3434
| [errorCode](#errorcode) | Returns the error code for the parsing operation. |
35-
| [errorString](#errorstring) | Returns the error string that corresponds with `errorCode`. |
35+
| [errorString](#errorstring) | Returns the error string that corresponds with `errorCode`. | -->
3636

3737
## originalImageHashId
3838

programming/javascript/release-notes/index.md

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

1010
# Dynamsoft Code Parser JavaScript SDK - Release Notes
1111

12-
- [2.2.10 (04/01/2024)](js-2.md/#2210-04012024)
12+
- [2.2.10 (04/11/2024)](js-2.md/#2210-04112024)
1313
- [2.0.20 (01/19/2024)](js-2.md/#2020-01192024)
1414
- [1.1.0 (07/19/2022)](js-1.md/#110-07192022)
1515
- [1.0.2 (06/08/2022)](js-1.md/#102-06082022)

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ noTitleIndex: true
1010

1111
# Release Notes for JavaScript SDK - 2.x
1212

13-
## 2.2.10 (04/01/2024)
13+
## 2.2.10 (04/11/2024)
14+
15+
### Improved
16+
17+
* Security update for `DynamsoftCodeParser` library and other corresponding libraries.
18+
19+
* Update the API [`loadSpec`]({{ site.dcp_js_api }}code-parser-module-class.html#loadspec) to supporting loading multiple specifications at a time.
1420

1521
### Fixed
1622

0 commit comments

Comments
 (0)