VintaSoft Twain .NET SDK 15.0: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceJS type / set_SaneResolution Property
Syntax Exceptions Example BrowserCompatibility SeeAlso
In This Topic
    set_SaneResolution Method
    In This Topic
    Sets image resolution 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: number
    
    returnValue = instance.set_SaneResolution(value);
    
    
    function set_SaneResolution(
    value
    Resolution.
    : number
    ) : any;

    Parameters

    value
    Resolution.
    Exceptions
    ExceptionDescription
    Thrown if device is not opened OR error occurs during setting value of device capability.
    Example

    // Sets scan resolution of opened SANE device.
    function setSaneScanResolution(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 300 dpi resolution for SANE device
            saneDevice.set_SaneResolution(300);
            console.log("Scan resolution: " + saneDevice.get_SaneResolution());
        }
        catch (ex) {
            alert(ex);
        }
    }
    

    Browser Compatibility
    9
    See Also