Skip to content

Commit 5986627

Browse files
Update loadSpec documentation to clarify specificationPath usage and add remarks on resource merging
1 parent f1aabea commit 5986627

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,19 @@ loadSpec(specificationName: string | Array<string>, specificationPath?: string):
4444
**Parameters**
4545

4646
* `specificationName`: specifies the name of the specification.
47-
* `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/[email protected]/dist/", then calling `Dynamsoft.DCP.CodeParserModule.loadSpec("AADHAAR")` will load the file "AADHAAR.data" from "https://cdn.jsdelivr.net/npm/dynamsoft-[email protected]/dist/specification/AADHAAR.data".
47+
* `specificationPath`: specifies the path to find the specification file. If not specified, the method will try to load the file from the path specified in `Dynamsoft.Core.CoreModule.engineResourcePaths`. For example, if the engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/", then calling `Dynamsoft.DCP.CodeParserModule.loadSpec("AADHAAR")` will load the file "AADHAAR.data" from "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-data/parser-resources/AADHAAR.data".
4848

4949
**Code Snippet**
5050

5151
```javascript
5252
await Dynamsoft.DCP.CodeParserModule.loadSpec("AADHAAR");
5353
```
5454

55+
**Remarks**
56+
57+
Starting from CaptureVisionBundle version 3.4.1000, some specification resources have been merged. The complete set of current resources can be found at:
58+
https://www.npmjs.com/package/dynamsoft-capture-vision-data
59+
5560
### onSpecLoadProgressChanged
5661

5762
An event that fires during the loading of specification files.

0 commit comments

Comments
 (0)