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

    Return Value

    An array that contains supported scan color modes of eSCL device.
    Exceptions
    ExceptionDescription
    Thrown if device is not opened OR error occurs during getting value of device capability.
    Example

    // Gets information about supported scan color modes of opened eSCL device.
    function getSupportedEsclScanColorModes(esclDevice) {
        try {
            console.log("eSCL device: " + esclDevice.get_DeviceName());
            // if SANE device is not opened
            if (!esclDevice.get_IsOpened()) {
                console.log("Device is not opened. Please open device.");
                return;
            }
            // get information about supported scan color modes of eSCL device
            var esclScanColorModes = esclDevice.getSupportedEsclScanColorModes();
            console.log("Supported scan color modes:");
            // for each supported scan color mode
            for (var i = 0; i < esclScanColorModes.length; i++) {
                // output information about scan color mode
                console.log("- " + esclScanColorModes[i]);
            }
        }
        catch (ex) {
            alert(ex);
        }
    }
    

    Browser Compatibility
    9
    See Also