Reference Guide
Reference Guides / JavaScript API / Actions / TWAIN Acquisition / TwainSetConfig
In This Topic
    TwainSetConfig
    In This Topic
     TwainSetConfig

    This function allows you to define custom parameters for the subsequent acquisitions from a TWAIN device.

    TwainSetConfig: function (docuViewareID, enableCustomConfiguration, selectFeeder, resolution, bitDepth, enableDuplex, hideUI[, extConfig])

    Parameters

    docuViewareID
    The identifier for the DocuVieware™ instance you want to acquire in.
    enableCustomConfiguration
    Boolean value to define if the custom configuration should be used for the subsequent acquisitions (true) or not (false).
    selectFeeder
    Boolean value to define if the acquisition should be done from the feeder (true) or from the flatbed (false).
    resolution
    The resolution the subsequent acquisitions should be done at (for instance 200 for 200 DPI).
    bitDepth
    The bit depht the subsequent acquisitions should be done at (for instance 24 for a 24-bit per pixel acquisition).
    enableDuplex
    Boolean value to define if the subsequent acquisitions should be done single sided (false) or duplex (true).
    hideUI
    Boolean value to define if the subsequent acquisitions will hide the device driver's UI (true) or show it (false).
    extConfig
    An optionnal array of object having the following prototype: {capability, value} that allows you to send advanced TWAIN capabilities settings.
    The capability is a member of the DocuViewareAPI.TwainCapabilities enumeration and value is set as a string.
    If you want to scan from the document feeder at 200 DPI, 24-bit per pixel colors, no duplex, hiding the driver's UI and enable red color dropout in your DocuVieware1 instance, the corresponding call will be:
    DocuViewareAPI.TwainSetConfig("DocuVieware1", true, true, 200, 24, false, true, [{ capability: DocuViewareAPI.TwainCapabilities.ICAP_FILTER, value: "0" }]);

    Return Value

    1 if error, 0 if success.