Resource Base
Table of contents

CodeParserModule Class

The CodeParserModule class is defined in the namespace Dynamsoft.DCP.

API Name Description
static getVersion() Returns the version of the CodeParser module.
static loadSpec() Loads the specification for a certain type of code strings.

getVersion

Returns the version of the CodeParser module.

static getVersion(): string;

Code snippet

const version = Dynamsoft.DCP.CodeParserModule.getVersion();
console.log(version);

loadSpec

Loads the specification for a certain type of code strings.

loadSpec(specificationName: string | Array<string>, specificationPath?: string): Promise<void>;

Parameters

  • specificationName: specifies the name of the specification.
  • 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”.

Code Snippet

await Dynamsoft.DCP.CodeParserModule.loadSpec("AADHAAR");

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version(2.2.10)
  • Version 2.x
    • Version 2.0.20
  • Version 1.x
    • Version 1.1.0
    • Version 1.0.2
  • Documentation Homepage
Change +