Skip to content

Commit dce39f0

Browse files
authored
Update support-wia-scanner-drivers.md
1 parent 9e4de1a commit dce39f0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

faq/support-wia-scanner-drivers.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Prior to Dynamic Web TWAIN version 18.2, WIA drivers are not supported and TWAIN
1818
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).
1919

2020
Since Dynamic Web TWAIN v18.0, we introduced a new set of scanner related APIs.
21-
To support WIA 2.0,
21+
To compatible with both TWAIN and WIA 2.0,
2222
- If your application is already using the new set of APIs below, no application change is required.
2323
- If not, replace the old APIs with the matching new APIs.
2424

@@ -29,5 +29,17 @@ To support WIA 2.0,
2929
| [SelectSourceAsync()](https://www.dynamsoft.com/web-twain/docs/info/api/WebTwain_Acquire.html#selectsourceasync) | [SelectSource()](https://www.dynamsoft.com/web-twain/docs/info/api/WebTwain_Acquire.html#selectsource) |
3030
| [AcquireImageAsync()](https://www.dynamsoft.com/web-twain/docs/info/api/WebTwain_Acquire.html#acquireimageasync) | [AcquireImage()](https://www.dynamsoft.com/web-twain/docs/info/api/WebTwain_Acquire.html#acquireimage) |
3131

32+
### Example Code
33+
34+
```javascript
35+
DWObject.GetDevicesAsync(Dynamsoft.DWT.EnumDWT_DeviceType.TWAINSCANNER|Dynamsoft.DWT.EnumDWT_DeviceType.WIASCANNER).then((deviceList)=>{
36+
return DWObject.SelectDeviceAsync(deviceList[0]) //Select the first device
37+
}).then(()=>{
38+
return DWObject.AcquireImageAsync({})
39+
}).catch((e)=>{
40+
console.error(e)
41+
})
42+
```
43+
3244
### Difference between the WIASCANNER and WIATWAINSCANNER DeviceType
3345
To support the WIA protocol in v18.2+, we added a new Enumaration `WIASCANNER` to [Dynamsoft.DWT.EnumDWT_DeviceType](https://www.dynamsoft.com/web-twain/docs/info/api/Dynamsoft_Enum.html?ver=latest&&cVer=true#dynamsoftdwtenumdwt_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.

0 commit comments

Comments
 (0)