Dev Center
Table of contents

Thanks for Downloading Dynamic Web TWAIN 30-Day Trial!

Your download will start shortly. If your download does not begin, click here to retry.

Capture/Image Source

How can I support WIA scanner drivers in my application?

Prior to Dynamic Web TWAIN version 18.2, WIA drivers are not supported and TWAIN drivers are recommended. Please refer to this article for the differences between WIA and TWAIN drivers.

As of Dynamic Web TWAIN version 18.2, we officially support WIA 2.0. By comparison, WIA can only control a very limited set of general capabilities of the device, while TWAIN can control all standard and even custom capabilities of the device. In addition, WIA has only two transfer modes (Memory, File), while TWAIN has three (Native, Memory, File).

Since Dynamic Web TWAIN v18.0, we introduced a new set of scanner related APIs. To compatible with both TWAIN and WIA 2.0,

  • If your application is already using the new set of APIs below, no application change is required.
  • If not, replace the old APIs with the matching new APIs.
New APIs (supports WIA) Old APIs
GetDeviceAsync() GetSourceNames(), GetSourceNamesAsync()
SelectDeviceAsync() SelectSourceByIndex(), SelectSourceByIndexAsync()
SelectSourceAsync() SelectSource()
AcquireImageAsync() AcquireImage()

Example Code

DWObject.GetDevicesAsync(Dynamsoft.DWT.EnumDWT_DeviceType.TWAINSCANNER|Dynamsoft.DWT.EnumDWT_DeviceType.WIASCANNER).then((deviceList)=>{
  return DWObject.SelectDeviceAsync(deviceList[0])  //Select the first device
}).then(()=>{
    return DWObject.AcquireImageAsync({}) 
}).catch((e)=>{
    console.error(e)
})

Difference between the WIASCANNER and WIATWAINSCANNER DeviceType

To support the WIA protocol in v18.2+, we added a new Enumaration WIASCANNER to Dynamsoft.DWT.EnumDWT_DeviceType . The enumaration named WIATWAINSCANNER represents WIA sources mapped through the TWAIN protocol after packaging by Microsoft. It was used in previous versions of Dynamic Web TWAIN and it will continue to be supported.

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version (18.4)
    • Version 18.3
    • Version 18.1
    • Version 18.0
    • Version 17.3
    • Version 17.2.1
    • Version 17.1.1
    • Version 17.0
    • Version 16.2
    • Version 16.1.1
    Change +