VintaSoft Twain .NET SDK 15.0: Документация для Веб разработчика
Vintasoft.Twain Namespace / WebTwainDeviceJS type / getSupportedSaneScanSources Property
Синтаксис Exceptions Example Совместимость с браузерами Смотрите также
В этом разделе
    getSupportedSaneScanSources Метод
    В этом разделе
    Возвращает поддерживаемые источники сканирования открытого SANE устройства.
    Синтаксис
    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

    Массив строк, содержащий имена поддерживаемых источников сканирования SANE устройства.
    Исключения
    ИсключениеОписание
    Выбрасывается, если устройство не открыто ИЛИ возникает ошибка при получении значения возможностей устройства.
    Пример

    // 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);
        }
    }
    

    Совместимость с веб браузерами
    9
    Смотрите также