Resource Base
Table of contents

Interfaces


ServiceInfo

Syntax

interface ServiceInfo {
   server: string;
   attrs?: any
}

Device

Syntax

interface Device {
   name: string;
   displayName: string;
   deviceType: DeviceType;
   serviceInfo?: ServiceInfo;
   deviceInfo?: any;
}

DeviceConfiguration

Syntax

interface DeviceConfiguration {
    PageSize?: Dynamsoft.DWT.EnumDWT_CapSupportedSizes; // Scanned page size
    PixelType?: Dynamsoft.DWT.EnumDWT_PixelType; //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; //How much extended information is retrieved. Only valid when {IfGetExtImageInfo} is true.
    IfCloseSourceAfterAcquire?: boolean; //Whether to close the data source after aquisition. Default: true.
}

Please refer to EnumDWT_CapSupportedSizes and EnumDWT_PixelType.

rect

Syntax

interface rect{
    // The index of the selected area. The index is 0-based. This is useful when you have multiple selected areas on one page.
    index?: number;
    // The x-coordinate of the upper-left corner of the area.
    x: number;
    // The y-coordinate of the upper-left corner of the area.
    y: number;
    // The width of the selected area.
    width: number;
    // The height of the selected area.
    height: number;
}

CapabilityDetails

Detailed information about a specific capability.

Syntax

interface CapabilityDetails {
    /**
     * The Capability.
     */
    capability: ValueAndLabel;
    /**
     * The container type of the Capability
     */
    conType?: ValueAndLabel;
    /**
     * The index for the current value of the Capability
     */
    curIndex?: number;
    /**
     * The current value of the Capability
     */
    curValue?: ValueAndLabel;
    /**
     * The index for the default value of the Capability
     */
    defIndex?: number;
    /**
     * The operation types that are supported by the Capability. Types include {"get", "set", "reset" "getdefault", "getcurrent"}
     */
    query?: string[];
    /**
     * The value type of the Capability. Value types include
        TWTY_BOOL: 6
        TWTY_FIX32: 7
        TWTY_FRAME: 8
        TWTY_INT8: 0
        TWTY_INT16: 1
        TWTY_INT32: 2
        TWTY_STR32: 9
        TWTY_STR64: 10
        TWTY_STR128: 11
        TWTY_STR255: 12
        TWTY_UINT8: 3
        TWTY_UINT16: 4
        TWTY_int: 5
     */
    valueType?: ValueAndLabel;
    /**
     * The available values of the Capability
     */
    values?: ValueAndLabel[];
}

Capabilities

Syntax

interface Capabilities {
    /**
     * Whether to "ignore" or "fail" the request if an exception occurs. This is an overall setting that is inherited by all capabilities.
     */
    exception: string;
    /**
     * Specifies how to set capabilities
     */
    capabilities: CapabilitySetup[]
}

CapabilitySetup

Syntax

interface CapabilitySetup {
    /**
     * Specify a capability
     */
    capability: Dynamsoft.DWT.EnumDWT_Cap;
    /**
     * The value to set to the capability or the value of the capability after setting.
     */
    curValue: number | string; //array is not supported
    errorCode?: number;
    errorString?: string;
    /**
     * Whether to "ignore" or "fail" the request if an exception occurs when setting this specific capability.
     */
    exception? : string;
}

Please refer to EnumDWT_Cap.

BufferChangeInfo

Syntax

interface BufferChangeInfo {
    /**
     * Action type includes 'add', 'remove', 'modify', 'shift' and 'filter'
     */
    action: string;
    /**
     * The image id (not the index) of the current page.
     */
    currentId: number;
    /**
     * All image ids.
     */
    imageIds: number[];
    /**
     * All selected image ids.
     */
    selectedIds: number[];
}

OutputInfo

Syntax

interface OutputInfo {
  /**
   * Id of the image if it's transferred to the buffer.
   */
  imageId?: number;
  /**
   * Path of the image if it's transferred to the disk.
   */
  Path?: string;
  /**
   * Information about the image.
   */
  imageInfo?: object;
  /**
   * Extended information about the image.
   */
  extendedImageInfo?: object;
}

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 18.2
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support