Skip to content

Commit 138773c

Browse files
committed
Update WebTwain_Acquire.md
1 parent ba7b44d commit 138773c

File tree

1 file changed

+74
-55
lines changed

1 file changed

+74
-55
lines changed

info/api/WebTwain_Acquire.md

Lines changed: 74 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,17 +4021,20 @@ DWObject.RegisterEvent("OnPostTransfer", function () {
40214021

40224022
## OnPostTransferAsync
40234023

4024+
This event is triggered after each page has been scanned and transferred. This is the asynchronous counterpart to the synchronous event {OnPostTransfer}.
4025+
40244026
**Syntax**
40254027

40264028
```typescript
4027-
/**
4028-
* This event is triggered after each page has been scanned and transferred. This is the asynchronous counterpart to the synchronous event {OnPostTransfer}.
4029-
* @argument outputInfo Detailed information about the image that just got transferred.
4030-
*/
40314029
RegisterEvent("OnPostTransferAsync", function (outputInfo: OutputInfo) {});
40324030
```
40334031

4032+
**Parameters**
4033+
4034+
`outputInfo`: Detailed information about the image that just got transferred.
4035+
40344036
**Availability**
4037+
40354038
<div class="availability">
40364039
<table>
40374040

@@ -4089,16 +4092,16 @@ DWObject.RegisterEvent("OnPostTransferAsync", function (outputInfo) {
40894092

40904093
## OnPreAllTransfers
40914094

4095+
This event is triggered when all images are scanned and ready to be transferred.
4096+
40924097
**Syntax**
40934098

40944099
```typescript
4095-
/**
4096-
* This event is triggered when all images are scanned and ready to be transferred.
4097-
*/
40984100
RegisterEvent("OnPreAllTransfers", function () {});
40994101
```
41004102

41014103
**Availability**
4104+
41024105
<div class="availability">
41034106
<table>
41044107

@@ -4136,16 +4139,16 @@ In the callback function of this event, you can call `CancelAllPendingTransfers(
41364139

41374140
## OnPreTransfer
41384141

4142+
This event is triggered when a page has been scanned and is ready to be transferred.
4143+
41394144
**Syntax**
41404145

41414146
```typescript
4142-
/**
4143-
* This event is triggered when a page has been scanned and is ready to be transferred.
4144-
*/
41454147
RegisterEvent('OnPreTransfer',function(){...});
41464148
```
41474149

41484150
**Availability**
4151+
41494152
<div class="availability">
41504153
<table>
41514154

@@ -4180,16 +4183,16 @@ In the callback function of this event, you can
41804183

41814184
## OnSourceUIClose
41824185

4186+
This event is triggered when the user interface of the data source is closed manually by the user.
4187+
41834188
**Syntax**
41844189

41854190
```typescript
4186-
/**
4187-
* This event is triggered when the user interface of the data source is closed manually by the user.
4188-
*/
41894191
RegisterEvent("OnSourceUIClose", function () {});
41904192
```
41914193

41924194
**Availability**
4195+
41934196
<div class="availability">
41944197
<table>
41954198

@@ -4216,23 +4219,14 @@ RegisterEvent("OnSourceUIClose", function () {});
42164219

42174220
## getCapabilities
42184221

4222+
Gets detailed information about all capabilities of the current data source.
4223+
42194224
**Syntax**
42204225

42214226
```typescript
4222-
/**
4223-
* Gets detailed information about all capabilities of the current data source.
4224-
* @param successCallback A callback function that is executed if the request succeeds.
4225-
* @param failureCallback A callback function that is executed if the request fails.
4226-
* @argument capabilityDetails Detailed information about the specified capabilities.
4227-
* @argument errorCode The error code.
4228-
* @argument errorString The error string.
4229-
*/
42304227
getCapabilities(
42314228
successCallback: (capabilityDetails: CapabilityDetails[]) => void,
4232-
failureCallback: (
4233-
errorCode: number,
4234-
errorString: string
4235-
) => void
4229+
failureCallback: (errorCode: number, errorString: string) => void
42364230
): void;
42374231

42384232
/**
@@ -4298,7 +4292,17 @@ interface ValueAndLabel {
42984292
}
42994293
```
43004294

4295+
**Parameters**
4296+
4297+
`successCallback`: A callback function that is executed if the request succeeds.
4298+
- `capabilityDetails`: Detailed information about the specified capabilities.
4299+
4300+
`failureCallback`: A callback function that is executed if the request fails.
4301+
- `errorCode`: The error code.
4302+
- `errorString`: The error string.
4303+
43014304
**Availability**
4305+
43024306
<div class="availability">
43034307
<table>
43044308

@@ -4333,16 +4337,11 @@ Check out the Enumerations
43334337

43344338
## setCapabilities
43354339

4340+
Sets up one or multiple capabilities in one call.
4341+
43364342
**Syntax**
43374343

43384344
```typescript
4339-
/**
4340-
* Sets up one or multiple capabilities in one call.
4341-
* @param capabilities A object that describes how to set capabilities.
4342-
* @param successCallback A callback function that is executed if the request succeeds.
4343-
* @param failureCallback A callback function that is executed if the request fails.
4344-
* @argument capabilities The capabilities to set.
4345-
*/
43464345
setCapabilities(
43474346
capabilities: Capabilities,
43484347
successCallback: (capabilities: Capabilities) => void,
@@ -4378,7 +4377,17 @@ interface CapabilitySetup {
43784377
}
43794378
```
43804379

4380+
**Parameters**
4381+
4382+
`capabilities`: A object that describes how to set capabilities.
4383+
4384+
`successCallback`: A callback function that is executed if the request succeeds.
4385+
4386+
`failureCallback`: A callback function that is executed if the request fails.
4387+
- `capabilities`: The capabilities to set.
4388+
43814389
**Availability**
4390+
43824391
<div class="availability">
43834392
<table>
43844393

@@ -4455,17 +4464,20 @@ DWObject.setCapabilities(
44554464

44564465
## GetDevicesAsync
44574466

4467+
Return all available devices (scanners, eSCL scanners, etc.) for the device type (if specified)
4468+
44584469
**Syntax**
44594470

44604471
```typescript
4461-
/**
4462-
* Return all available devices (scanners, eSCL scanners, etc.) for the device type (if specified)
4463-
* @param deviceType The device type
4464-
* @param refresh Default value: false
4465-
*/
44664472
GetDevicesAsync(deviceType?: Dynamsoft.DWT.EnumDWT_DeviceType | number, refresh?:boolean): Promise<Device[]>;
44674473
```
44684474

4475+
**Parameters**
4476+
4477+
`deviceType`: The device type
4478+
4479+
`refresh`: Default value is **false**
4480+
44694481
**Example**
44704482

44714483
```javascript
@@ -4479,6 +4491,7 @@ DWObject.GetDevicesAsync().then((deviceList)=>{
44794491
```
44804492

44814493
**Availability**
4494+
44824495
<div class="availability">
44834496
<table>
44844497

@@ -4509,13 +4522,11 @@ DWObject.GetDevicesAsync().then((deviceList)=>{
45094522

45104523
## SelectDeviceAsync
45114524

4525+
Select the device to use for scanning
4526+
45124527
**Syntax**
45134528

45144529
```typescript
4515-
/**
4516-
* Select the device to use for scanning
4517-
* @param device the device
4518-
*/
45194530
SelectDeviceAsync(device: Device): Promise< boolean>;
45204531
```
45214532

@@ -4531,7 +4542,12 @@ DWObject.GetDevicesAsync().then((deviceList)=>{
45314542
})
45324543
```
45334544

4545+
**Parameters**
4546+
4547+
`device`: the device
4548+
45344549
**Availability**
4550+
45354551
<div class="availability">
45364552
<table>
45374553

@@ -4558,29 +4574,20 @@ DWObject.GetDevicesAsync().then((deviceList)=>{
45584574

45594575
## AcquireImageAsync
45604576

4577+
Scan documents into another DWObject control. eSCL is not supported.
4578+
45614579
**Syntax**
45624580

45634581
```typescript
4564-
/**
4565-
* Scan documents into another DWObject control. eSCL is not supported.
4566-
* @param deviceConfiguration The device configuration
4567-
*/
45684582
AcquireImageAsync(deviceConfiguration?: DeviceConfiguration): Promise< boolean>;
45694583
```
45704584

4571-
**Example**
4585+
**Parameters**
45724586

4573-
```javascript
4574-
DWObject.GetDevicesAsync().then((deviceList)=>{
4575-
return DWObject.SelectDeviceAsync(deviceList[0]) //Select the first device
4576-
}).then(()=>{
4577-
return DWObject.AcquireImageAsync({})
4578-
}).catch((e)=>{
4579-
console.error(e)
4580-
})
4581-
```
4587+
`deviceConfiguration`: The device configuration
45824588

45834589
**Availability**
4590+
45844591
<div class="availability">
45854592
<table>
45864593

@@ -4602,3 +4609,15 @@ DWObject.GetDevicesAsync().then((deviceList)=>{
46024609

46034610
</table>
46044611
</div>
4612+
4613+
**Example**
4614+
4615+
```javascript
4616+
DWObject.GetDevicesAsync().then((deviceList)=>{
4617+
return DWObject.SelectDeviceAsync(deviceList[0]) //Select the first device
4618+
}).then(()=>{
4619+
return DWObject.AcquireImageAsync({})
4620+
}).catch((e)=>{
4621+
console.error(e)
4622+
})
4623+
```

0 commit comments

Comments
 (0)