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

var value; // Type: number[]
value = instance.getSupportedSaneResolutions();

Return Value

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

// 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.");
            return;
        }
        // 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) {
        alert(ex);
    }
}

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