0

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

C J
  • 23
  • 4
  • Did you read this? https://www.dynamsoft.com/web-twain/docs/indepth/development/angular.html – MikeOne Apr 13 '22 at 17:07
  • @MikeOne Yes I had read the above documentation. But I did not find any way to configure dynamsoft without changing dynamsoft.webtwain.min.mjs file in the node modules – C J Apr 14 '22 at 15:27

1 Answers1

0

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

yushulx
  • 11,695
  • 8
  • 37
  • 64