Skip to content

Commit 433af2e

Browse files
committed
Update WebTwain_Acquire.md
1 parent 03b9833 commit 433af2e

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

info/api/WebTwain_Acquire.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,6 +2196,23 @@ IfDisableSourceAfterAcquire: boolean;
21962196

21972197
This property only makes sense when `IfShowUI` is set to `true` .
21982198

2199+
**Example**
2200+
2201+
```javascript
2202+
DWObject.OpenSource();
2203+
DWObject.IfDisableSourceAfterAcquire = true; // Close the scanner UI after images acquired.
2204+
DWObject.IfShowUI = true;
2205+
DWObject.AcquireImage(successCallback,failureCallback);
2206+
2207+
function successCallback() {
2208+
DWObject.CloseSource();
2209+
}
2210+
2211+
function failureCallback(errorCode, errorString) {
2212+
DWObject.CloseSource();
2213+
}
2214+
```
2215+
21992216
---
22002217

22012218
## IfDuplexEnabled
@@ -2238,6 +2255,18 @@ Set this property after `OpenSource()` and before `AcquireImage()` .
22382255

22392256
Not all scanners support duplex scanning. To confirm, check the user manual of the device or check the value of `Duplex` after `OpenSource()` .
22402257

2258+
**Example**
2259+
2260+
```javascript
2261+
DWObject.OpenSource();
2262+
2263+
if (DWObject.Duplex != 0) { // Note: DWObject.Duplex doesn't support Linux.
2264+
DWObject.IfDuplexEnabled = true;
2265+
}
2266+
2267+
DWObject.AcquireImage();
2268+
```
2269+
22412270
---
22422271

22432272
## IfFeederEnabled
@@ -2280,6 +2309,14 @@ Set this property after `OpenSource()` and before `AcquireImage()` .
22802309

22812310
If the property is set to `true` , the data source will try acquiring images from the document feeder first. If the data source doesn't have a document feeder, the flatbed will be used.
22822311

2312+
**Example**
2313+
2314+
```javascript
2315+
DWObject.OpenSource();
2316+
DWObject.IfFeederEnabled = true;
2317+
DWObject.AcquireImage();
2318+
```
2319+
22832320
---
22842321

22852322
## IfShowUI
@@ -2319,7 +2356,15 @@ IfShowUI: boolean;
23192356

23202357
If the property is set to `true` , the data source will display its user interface when `AcquireImage()` is called. Otherwise, the UI will not be displayed and the scan will start immediately.
23212358

2322-
It's recommended to use this API after OpenSource() is called.
2359+
It's recommended to use this API after `OpenSource()` is called.
2360+
2361+
**Example**
2362+
2363+
```javascript
2364+
DWObject.OpenSource();
2365+
DWObject.IfShowUI = true; // display the scanner UI before acquiring image
2366+
DWObject.AcquireImage();
2367+
```
23232368

23242369
---
23252370

0 commit comments

Comments
 (0)