VintaSoft Twain .NET SDK 15.0: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceJS type / set_SaneScanMode Property
Syntax Exceptions Example BrowserCompatibility SeeAlso
In This Topic
    set_SaneScanMode Method
    In This Topic
    Sets name of scan mode of SANE 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_SaneScanMode(value);
    
    
    function set_SaneScanMode(
    value
    A name of scan mode of SANE device.
    : string
    ) : any;

    Parameters

    value
    A name of scan mode of SANE device.
    Exceptions
    ExceptionDescription
    Thrown if device is not opened OR error occurs during setting value of device capability.
    Example

    // Sets scan mode of opened SANE device.
    function setSaneScanMode(saneDevice) {
        try {
            console.log("SANE device: " + saneDevice.get_DeviceName());
            // if SANE device is not opened
            if (!saneDevice.get_IsOpened()) {
                console.log("Device is not opened. Please open device.");
                return;
            }
            // set the "Color" scan mode for SANE device
            saneDevice.set_SaneScanMode("Color");
            console.log("Scan mode: " + saneDevice.get_SaneScanMode());
        }
        catch (ex) {
            alert(ex);
        }
    }
    

    Browser Compatibility
    9
    See Also