VintaSoft Twain .NET SDK 15.2: Документация для Веб разработчика
Vintasoft.Twain Namespace / WebTwainDeviceJS type / getSupportedSaneScanModes Property
Синтаксис Exceptions Example Совместимость с браузерами Смотрите также
getSupportedSaneScanModes Метод
Возвращает поддерживаемые режимы сканирования открытого SANE устройства.
Синтаксис
var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);

var value; // Type: string[]
value = instance.getSupportedSaneScanModes();

Return Value

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

// Gets information about supported scan modes of opened SANE device.
function getSupportedSaneScanModes(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 modes of SANE device
        var saneScanModes = saneDevice.getSupportedSaneScanModes();
        console.log("Supported scan modes:");
        // for each supported scan mode
        for (var i = 0; i < saneScanModes.length; i++) {
            // output information about scan source
            console.log("- " + saneScanModes[i]);
        }
    }
    catch (ex) {
        alert(ex);
    }
}

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