Skip to content
33 changes: 18 additions & 15 deletions info/api/Device.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,11 @@ interface Device {

## DeviceObject.acquireImage()

Scan documents into another DWObject control. Supports eSCL scanners and all other scanners with limited capabilities.

**Syntax**

```typescript
/**
* Scan documents into another DWObject control. Supports eSCL scanners and all other scanners with limited capabilities.
* @param deviceConfiguration The device configuration
* @param sendTo The DWObject control to scan into
*/
acquireImage(deviceConfiguration: DeviceConfiguration | null, sendTo: WebTwain): Promise< boolean>;

interface DeviceConfiguration {
Expand All @@ -64,17 +61,11 @@ interface DeviceConfiguration {
}
```

**Example**
**Parameters**

```javascript
DWObject.GetDevicesAsync().then((deviceList)=>{
return deviceList[0].acquireImage({},DWObject)
}).then((result)=>{
console.log(result)
}).catch((e)=>{
console.error(e)
})
```
`deviceConfiguration`: The device configuration

`sendTo`: The DWObject control to scan into

**Availability**
<div class="availability">
Expand All @@ -98,3 +89,15 @@ DWObject.GetDevicesAsync().then((deviceList)=>{

</table>
</div>

**Example**

```javascript
DWObject.GetDevicesAsync().then((deviceList)=>{
return deviceList[0].acquireImage({},DWObject)
}).then((result)=>{
console.log(result)
}).catch((e)=>{
console.error(e)
})
```
38 changes: 21 additions & 17 deletions info/api/Dynamsoft_WebTwainEnv.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,11 @@ UpdateCert(

## licenseException

Error message related to license.

**Syntax**

``` typescript
/**
* Error message related to license.
*/
licenseException: string;
```

Expand Down Expand Up @@ -132,27 +131,32 @@ Sets or returns where the library looks for resources files including service in

### `UpdateCert`

Update and download certificate (server.pem.ldsc & server_key.pem.ldsc) to DynamsoftServicex64_17\cert.

**Syntax**

``` typescript
/**
* Update and download certificate (server.pem.ldsc & server_key.pem.ldsc) to DynamsoftServicex64_17\cert.
* @param url Url to download the new certificate. E.g. http://download.dynamsoft.com/cert.zip. server.pem.ldsc & server_key.pem.ldsc should be in cert.zip.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
UpdateCert(
url: string,
optionalAsyncSuccessFunc?: () => void,
optionalAsyncFailureFunc?: (
errorCode: number,
errorString: string) => void
);
url: string,
optionalAsyncSuccessFunc?: () => void,
optionalAsyncFailureFunc?: (
errorCode: number,
errorString: string) => void
);
```

**Parameters**

`url`: Url to download the new certificate. E.g. http://download.dynamsoft.com/cert.zip. server.pem.ldsc & server_key.pem.ldsc should be in cert.zip.

`successCallback`: A callback function that is executed if the request succeeds.

`failureCallback`: A callback function that is executed if the request fails.
- `errorCode`: The error code.
- `errorString`: The error string.

**Availability**

<div class="availability">
<table>

Expand Down
Loading