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

    Parameters

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

    // Sets scan source of opened SANE device.
    function setSaneScanSource(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 "ADF" scan source for SANE device
            saneDevice.set_SaneScanSource("ADF");
            console.log("Scan source: " + saneDevice.get_SaneScanSource());
        }
        catch (ex) {
            alert(ex);
        }
    }
    

    Browser Compatibility
    9
    See Also