VintaSoft Twain .NET SDK 15.3: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceJS type / set_ScanIntent Property
Syntax Exceptions Example BrowserCompatibility SeeAlso
In This Topic
    set_ScanIntent Method
    In This Topic
    Sets the scan intent for WIA/eSCL device.
    Syntax
    var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
    
    var returnValue; // Type: any
    
    // Parameters
    var value; // Type: string
    
    returnValue = instance.set_ScanIntent(value);
    
    
    function set_ScanIntent(
    value
    The scan intent for WIA/eSCL device.
    Possible values for WIA device: "None", "ColorImage", "GrayscaleImage", "Text", "Mask".
    : string
    ) : any;

    Parameters

    value
    The scan intent for WIA/eSCL device.
    Possible values for WIA device: "None", "ColorImage", "GrayscaleImage", "Text", "Mask".
    Exceptions
    ExceptionDescription
    Thrown if device is not opened OR error occurs during setting value of device capability.
    Example

    // Sets scan intent of opened WIA/eSCL device.
    function setScanIntent(device) {
        try {
            console.log("Device: " + device.get_DeviceName());
            // if device is not opened
            if (!device.get_IsOpened()) {
                console.log("Device is not opened. Please open device.");
                return;
            }
            // set the 'ColorImage' intent as the scan intent for WIA device
            wiaDevice.set_ScanIntent("ColorImage");
            console.log("Scan intent: " + device.get_ScanIntent());
        }
        catch (ex) {
            alert(ex);
        }
    }
    

    Browser Compatibility
    9
    See Also