VintaSoft Twain .NET SDK 15.0: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceJS type / getSupportedSaneScanSources Property
Syntax Exceptions Example BrowserCompatibility SeeAlso
In This Topic
    getSupportedSaneScanSources Method
    In This Topic
    Returns supported scan sources of opened SANE device.
    Syntax
    var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
    
    var value; // Type: string[]
    value = instance.getSupportedSaneScanSources();
    
    
    function getSupportedSaneScanSources() : string[];
    

    Return Value

    A string array that contains names of supported scan sources of SANE device.
    Exceptions
    ExceptionDescription
    Thrown if device is not opened OR error occurs during getting value of device capability.
    Example

    // Gets information about supported scan sources of opened SANE device.
    function getSupportedSaneScanSources(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;
            }
            // get information about supported scan sources of SANE device
            var saneScanSources = saneDevice.getSupportedSaneScanSources();
            console.log("Supported scan sources:");
            // for each supported scan source
            for (var i = 0; i < saneScanSources.length; i++) {
                // output information about scan source
                console.log("- " + saneScanSources[i]);
            }
        }
        catch (ex) {
            alert(ex);
        }
    }
    

    Browser Compatibility
    9
    See Also