I am using Dynamsoft Web TWAIN In My Scanner.I am getting error with bellow code,
Html Code -
<button (click)="acquireImage()">Scan Document</button>
<div id="dwtcontrolContainer"></div>
Angular code -
acquireImage(): void {
const dwObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
dwObject.IfShowIndicator = false;
const bSelected = dwObject.SelectSource();
if (bSelected) {
const onAcquireImageSuccess = () => { dwObject.CloseSource(); };
const onAcquireImageFailure = onAcquireImageSuccess;
dwObject.OpenSource();
dwObject.AcquireImage({}, onAcquireImageSuccess, onAcquireImageFailure);
}
}
The namespace of Dynamic Web TWAIN has been changed. You can refer to the latest sample code https://github.com/Dynamsoft/dwt-angular-simple/blob/master/src/app/dwt/dwt.component.ts
Initialize Dynamic Web TWAIN Object:
Acquire images from scanners: