Skip to content

Commit 18140de

Browse files
committed
Update how-to-exclude-wia-sources-in-the-source-list.md
1 parent 6845a85 commit 18140de

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

faq/how-to-exclude-wia-sources-in-the-source-list.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,23 @@ permalink: /faq/how-to-exclude-wia-sources-in-the-source-list.html
1515

1616
> Applicable to Windows only
1717
18-
18+
There are two ways to achieve this:
1919

2020
* Set [IfUseTwainDSM]({{site.info}}api/WebTwain_Acquire.html#ifusetwaindsm) to `true`
2121

2222
``` javascript
2323
DWObject.IfUseTwainDSM = true;
2424
```
2525

26+
* Filter sources before listing them
27+
28+
``` javascript
29+
var sources = DWObject.GetSourceNames();
30+
for (var i = 0; i < sources.length; i++) {
31+
if (sources[i].toLowerCase().indexOf('wia') != -1) {
32+
sources.splice(i, 1);
33+
}
34+
}
35+
```
36+
2637
If you are still having issues with a device, please feel free to [contact us](https://www.dynamsoft.com/company/contact/) via email, live chat, or phone call.

0 commit comments

Comments
 (0)