How to add configurations in Dynamsoft Webtwain

473 views Asked by At

I am trying to implement Dynamsoft Web Twain in my Angular project. There is no config.js file in my node modules. Only dynamsoft.webtwain.min.js and dynamsoft.webtwain.min.mjs is available. So how to add or change the configurations of the dynamsoft without changing library files?

Screenshot of dwt in node modules

My Angular version is 13.3 and Dynamsoft Webtwain version: 17.2.4

1

There are 1 answers

0
yushulx On

In your *.ts files, import the package:

import Dynamsoft from 'dwt';

Then you can set configurations. For example:

Dynamsoft.DWT.ProductKey = "LICENSE-KEY";
Dynamsoft.DWT.ResourcesPath = "assets/dynamic-web-twain";

Here is my sample code: https://github.com/yushulx/angular-scanner-camera-capture