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.
    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.
    Thrown if device is not opened OR error occurs during getting value of device capability.

    // 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.");
            // 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) {

    Browser Compatibility
    See Also