Dev Center
Table of contents

Thanks for Downloading Dynamic Web TWAIN 30-Day Trial!

Your download will start shortly. If your download does not begin, click here to retry.

{DeviceObject} Scan

The properties and methods on this page live in the namespace {DeviceObject}.

interface Device  {
    /**
     * The real name of the device.
     */
    readonly name: string;
    /**
     * The displayed name of the device.
     */
    readonly displayName: string;
    readonly deviceType: Dynamsoft.EnumDWT_DeviceType;
    readonly serviceInfo?: ServiceInfo;
    readonly deviceInfo?: any;
    acquireImage(deviceConfiguration: DeviceConfiguration | null, sendTo: WebTwain): Promise< boolean>;
}

Methods

 
DeviceObject.acquireImage()

DeviceObject.acquireImage()

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

Syntax

acquireImage(deviceConfiguration: DeviceConfiguration | null, sendTo: WebTwain): Promise< boolean>;

interface DeviceConfiguration {
    IfShowUI?: boolean; //Whether to show the built-in User Interface from the device vendor
    PixelType?: Dynamsoft.DWT.EnumDWT_PixelType | number | string; //Whether to scan in color, grey or black & white
    Resolution?: number; //Measured by dots per pixel (DPI)
    IfFeederEnabled?: boolean; //Whether to use the document feeder or the flatbed of the device
    IfDuplexEnabled?: boolean; //Whether to scan one side or both sides
    IfDisableSourceAfterAcquire?: boolean; //Whether to close the built-in User Interface after aquisition. Only valid when {IfShowUI} is true.
    IfGetImageInfo?: boolean; //Whether to retrieve information about the image after it's transferred.
    IfGetExtImageInfo?: boolean; //Whether to retrieve extended information about the image after it's transferred.
    extendedImageInfoQueryLevel?: Dynamsoft.DWT.EnumDWT_ExtImageInfo | number; //How much extended information is retrieved. Only valid when {IfGetExtImageInfo} is true.
    SelectSourceByIndex?: number; //Specify a source by its index.
    IfCloseSourceAfterAcquire?: boolean; //Whether to close the data source after aquisition. Default: false.
}

Parameters

deviceConfiguration: The device configuration

sendTo: The DWObject control to scan into

Availability

ActiveX H5(Windows) H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux)
not supported v18.0+ v18.0+ v18.0+ v18.0+

Example

DWObject.GetDevicesAsync().then((deviceList)=>{
  return deviceList[0].acquireImage({},DWObject)  
}).then((result)=>{
    console.log(result)
}).catch((e)=>{
    console.error(e)
})

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version (18.4)
    • Version 18.3
    • Version 18.1
    • Version 18.0
    • Version 17.3
    • Version 17.2.1
    • Version 17.1.1
    • Version 17.0
    • Version 16.2
    • Version 16.1.1
    Change +