You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## What are the differences between TWAIN and WIA?
14
+
## What are the differences between TWAIN and WIA drivers?
15
15
16
-
TWAIN driver TWAIN is the most widely used protocol for physical document scanners. Almost all scanners in the market come with a TWAIN driver and are supported by TWAIN applications like the Dynamic Web TWAIN SDK.
16
+
TWAIN is the most widely used protocol for physical document scanners. Almost all scanners in the market come with a TWAIN driver and are supported by TWAIN applications like the Dynamic Web TWAIN SDK.
17
+
18
+
`WIA` stands for <ahref="https://docs.microsoft.com/en-us/windows/win32/wia/-wia-startpage"target="_blank">Windows Image Acquisition</a>, which is a Microsoft driver model for capturing digital images from various devices, such as scanners, cameras and other imaging devices. The WIA protocol is built-in and supported by Windows OS, so no extra driver installation is required. WIA offers standardized hardware compatibility and a stable driver environment, making it easier to integrate imaging capabilities into web scanning applications.
19
+
20
+
Prior to Dynamic Web TWAIN version 18.2, WIA drivers are not officially supported. But `WIA` devices can be used by `TWAIN` applications like `Dynamic Web TWAIN` through a `TWAIN compatibility layer`. This means `WIA` is not supported natively; therefore, when a device supports both `TWAIN` and `WIA`, `TWAIN` is the better option.
21
+
22
+
As of Dynamic Web TWAIN version 18.2, we officially support WIA 2.0 drivers. To make sure your web application works with WIA scanner drivers, please refer to the article: <ahref="{{site.faq}}support-wia-scanner-drivers.html"target="_blank">How do I support WIA scanner drivers in my application?</a>
17
23
18
-
`WIA` refers to <ahref="https://docs.microsoft.com/en-us/windows/win32/wia/-wia-startpage"target="_blank">Windows Image Acquisition</a>, which is the still image acquisition platform in the Windows family that enables imaging/graphics applications to interact with imaging hardware and standardizes the interaction between different applications and scanners.
19
24
20
-
`WIA` devices can be used by `TWAIN` applications like `Dynamic Web TWAIN` through a `TWAIN compatibility layer`. This means `WIA` is not supported natively; therefore, when a device supports both `TWAIN` and `WIA`, `TWAIN` is the better option.
21
25
22
-
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. Another thing is that `TWAIN` has three transfer modes (Native, Memory, File), while `WIA` only has two (Memory, File).
Copy file name to clipboardExpand all lines: faq/index.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,9 @@ permalink: /faq/
92
92
<li><ahref="{{site.faq}}scanner-not-shown-or-not-responding-in-the browser.html">Why is my scanner not shown or not responding in the browser?</a></li>
93
93
94
94
<li><ahref="{{site.faq}}download-virtual-scanner-for-testing.html">Download virtual scanner for testing</a></li>
95
+
96
+
<li><ahref="{{site.faq}}support-wia-scanner-drivers.html">How can I support WIA scanner drivers in my application?</a></li>
97
+
95
98
</ol>
96
99
97
100
## Image Viewer
@@ -361,6 +364,8 @@ permalink: /faq/
361
364
<li><ahref="{{site.faq}}type-error-appendchild.html">Error Message - Uncaught TypeError: Cannot read properties of null (reading 'appendChild') or Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'</a></li>
362
365
363
366
<li><ahref="{{site.faq}}error-message-user-cancelled-the-operation.html">Error Message - User cancelled the operation</a></li>
367
+
368
+
<li><ahref="{{site.faq}}the-loading-bar-keeps-spinning-when-capture-the-image-with-iphone.html">The loading bar keeps spinning when capture the image with iPhone.</a></li>
title: How can I support WIA scanner drivers in my application?
6
+
keywords: Dynamic Web TWAIN, Capture/ Image Source, WIA
7
+
breadcrumbText: How can I support WIA scanner drivers in my application?
8
+
description: How can I support WIA scanner drivers in my application?
9
+
permalink: /faq/support-wia-scanner-drivers.html
10
+
---
11
+
12
+
# Capture/Image Source
13
+
14
+
## How can I support WIA scanner drivers in my application?
15
+
16
+
Prior to Dynamic Web TWAIN version 18.2, WIA drivers are not supported and TWAIN drivers are recommended. Please refer to <ahref="{{site.faq}}difference-between-Twain-and-wia.html"target="_blank">this article</a> for the differences between WIA and TWAIN drivers.
17
+
18
+
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).
19
+
20
+
Since Dynamic Web TWAIN v18.0, we introduced a new set of scanner related APIs.
21
+
To compatible with both TWAIN and WIA 2.0,
22
+
- If your application is already using the new set of APIs below, no application change is required.
23
+
- If not, replace the old APIs with the matching new APIs.
returnDWObject.SelectDeviceAsync(deviceList[0]) //Select the first device
37
+
}).then(()=>{
38
+
returnDWObject.AcquireImageAsync({})
39
+
}).catch((e)=>{
40
+
console.error(e)
41
+
})
42
+
```
43
+
44
+
### Difference between the WIASCANNER and WIATWAINSCANNER DeviceType
45
+
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.
## The loading bar keeps spinning when capturing images with iPhone.
15
+
16
+
### Symptom
17
+
18
+
iOS 16.4 was released on March 27th, 2023. In this version, all browsers on iOS have begun to support `OffscreenCanvas`. Unfortunately, Apple's implementation of the API is still incomplete and is missing an important feature: "webgl context". Please see the MDN docs on [OffscreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) for more details.
19
+
20
+
### Cause
21
+
22
+
`OffscreenCanvas` is utilized in all versions of the Dynamic Web TWAIN Mobile Web Capture Edition. After you upgrade your iOS to v16.4, the loading bar will keep spinning when you try to capture an image. Note that the Service Edition is not affected by this issue.
23
+
24
+
### Resolution
25
+
26
+
Add the following lines of code to disable the API.
27
+
28
+
```javascript
29
+
if (Dynamsoft.navInfoSync.biPhone||Dynamsoft.navInfoSync.biPad) {
30
+
window.OffscreenCanvas=null
31
+
}
32
+
```
33
+
34
+
> If the resolution doesn't work for you, please [contact us](https://www.dynamsoft.com/company/contact/).
[Vue](https://vuejs.org/) is a progressive framework for building user interfaces. Check out the following guide on how to integrate `DWT` into a Vue application.
14
14
15
+
<divclass="multi-panel-switching-prefix"></div>
16
+
17
+
-[Vue](#vue)
18
+
-[Vue 3](#vue3)
19
+
20
+
<divclass="multi-panel-start"></div>
21
+
15
22
## Preparation
16
23
17
24
Make sure you have [node](https://nodejs.org/), [yarn](https://yarnpkg.com/cli/install), and [Vue CLI](https://cli.vuejs.org/) installed. `node 14.4.0` , `yarn 1.22.4`, and `@vue/cli 4.46` are used in the example below.
@@ -203,9 +210,200 @@ If you have installed `DWT` and have configured a valid `ProductKey` . You will
203
210
204
211
You should be able to open a file or capture an image.
205
212
213
+
<divclass="multi-panel-end"></div>
214
+
215
+
<divclass="multi-panel-start"></div>
216
+
217
+
## Preparation
218
+
219
+
The recommended version for Vue and Node is `v3.2.22` and `v16+` respectively.
220
+
221
+
## Create the sample project
222
+
223
+
### Create a bootstrapped raw Vue 3 application
224
+
225
+
Assume the project name is "dwt-vue3"
226
+
227
+
```cmd
228
+
npm init vue@latest
229
+
```
230
+
231
+
### Navigate to the root directory of the application and install the `dwt` and `ncp` package
232
+
233
+
```cmd
234
+
cd dwt-vue3
235
+
```
236
+
237
+
```cmd
238
+
npm install
239
+
```
240
+
241
+
```cmd
242
+
npm install dwt
243
+
```
244
+
245
+
```cmd
246
+
npm install ncp
247
+
```
248
+
249
+
## Configure the project
250
+
251
+
Open `package.json` and change `scripts` as seen below:
> *`containerId` specifies the DIV to create `DWT` viewer, which is defined in the `template`.
368
+
> *`OnWebTwainReady` is the callback triggered when `DWT` initialization succeeds.
369
+
> *`ProductKey` must be set to a valid trial or full key.
370
+
> *`ResourcesPath` is set to the location of the static files mentioned in [Configure the project](#configure-the-project).
371
+
372
+
Change the file /src/App.vue
373
+
374
+
```html
375
+
<scriptsetup>
376
+
importHelloWorldfrom'./components/localScan.vue'
377
+
</script>
378
+
379
+
<template>
380
+
<HelloWorld />
381
+
</template>
382
+
383
+
<stylescoped>
384
+
</style>
385
+
```
386
+
387
+
### Try running the project
388
+
389
+
```cmd
390
+
npm run dev
391
+
```
392
+
393
+
#### On desktop
394
+
395
+
If you have installed `DWT` and have configured a valid `ProductKey` . You will have a working page to scan documents from your scanner now. Otherwise, you should see instructions on [this page]({{site.indepth}}features/initialize.html#installation-of-the-dynamsoft-service) that guides you on installing the library.
396
+
397
+
#### On mobile
398
+
399
+
For Android, the scanners that support ESCL can be used.
0 commit comments