Dynamsoft.DDV.Core
API Index
Properties
API Name | Description |
---|---|
license |
Specify the license string. |
engineResourcePath |
Specify the path should lead to a folder containing the distributed WASM files. |
deviceFriendlyName |
Specify a human-readable name for the device which corresponds to its UUID. |
Methods
API Name | Description |
---|---|
loadWasm() |
Load WASM modules before initializing. |
init() |
Initialize DDV. |
Properties
license
Specify the license string.
Syntax
license: string;
Code Snippet
// Public trial license which is valid for 24 hours
// You can request a 30-day trial key from https://www.dynamsoft.com/customer/license/trialLicense/?product=ddv
Dynamsoft.DDV.Core.license = "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9";
Exception
Error Code | Error Message |
---|---|
-80100 | XXX(API): XXX(ParameterName) is invalid. |
engineResourcePath
Specify the path should lead to a folder containing the distributed WASM files.
Syntax
engineResourcePath: string;
Code Snippet
Dynamsoft.DDV.Core.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@1.1.0/dist/engine";
Exception
Error Code | Error Message |
---|---|
-80100 | XXX(API): XXX(ParameterName) is invalid. |
deviceFriendlyName
Specify a human-readable name for the device which corresponds to its UUID. This name will appear in the device details table when you check the statistics of the according license.
Syntax
deviceFriendlyName: string;
Code Snippet
Dynamsoft.DDV.Core.deviceFriendlyName = "xxxxxxx";
Exception
Error Code | Error Message |
---|---|
-80100 | XXX(API): XXX(ParameterName) is invalid. |
Remark
- Default value is
''
.
Methods
loadWasm()
Load WASM modules before initializing.
Syntax
loadWasm():Promise<void>;
Code Snippet
Dynamsoft.DDV.Core.loadWasm();
//OR
await Dynamsoft.DDV.Core.loadWasm();
Promise Exception
Error Code | Error Message |
---|---|
-80052 | XXX(API): Resource is not found from the specified engineResourcePath. |
init()
Initialize DDV.
Syntax
init():Promise<ConfigResult>;
Return values
A Promise ConfigResult
object.
Code Snippet
// Public trial license which is valid for 24 hours
// You can request a 30-day trial key from https://www.dynamsoft.com/customer/license/trialLicense/?product=ddv
Dynamsoft.DDV.Core.license = "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9";
Dynamsoft.DDV.Core.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@1.1.0/dist/engine";
Dynamsoft.DDV.Core.loadWasm();
await Dynamsoft.DDV.Core.init();
Promise Exception
Error Code | Error Message |
---|---|
-80052 | XXX(API): Resource is not found from the specified engineResourcePath. |