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

    Return Value

    An integer array that contains supported scan resolutions 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 resolutions of opened SANE device.
    function getSupportedSaneScanResolutions(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 resolutions of SANE device
            var saneScanResolutions = saneDevice.getSupportedSaneResolutions();
            console.log("Supported scan resolutions:");
            // for each supported scan resolution
            for (var i = 0; i < saneScanResolutions.length; i++) {
                // output information about scan source
                console.log("- " + saneScanResolutions[i]);
            }
        }
        catch (ex) {
            alert(ex);
        }
    }
    

    Browser Compatibility
    9
    See Also