getSupportedScanIntents Метод
В этом разделе
Возвращает названия поддерживаемых целей сканирования для открытого устройства WIA/eSCL.
Синтаксис
var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
var value; // Type: string[]
value = instance.getSupportedScanIntents();
function getSupportedScanIntents() : string[];
Return Value
Массив, содержащий названия поддерживаемых целей сканирования устройства WIA/eSCL.
Исключения
| Исключение | Описание |
| Выбрасывается, если устройство не открыто ИЛИ возникает ошибка при получении значения возможностей устройства. |
Пример
// Gets information about supported scan intents of opened WIA device.
function getSupportedScanIntents(device) {
try {
console.log("WIA device: " + device.get_DeviceName());
// if device is not opened
if (!device.get_IsOpened()) {
console.log("Device is not opened. Please open device.");
return;
}
// get information about supported scan intents of WIA device
var scanIntents = device.getSupportedScanIntents();
console.log("Supported scan intents:");
// for each supported scan intent
for (var i = 0; i < scanIntents.length; i++) {
// output information about scan intent
console.log("- " + scanIntents[i]);
}
}
catch (ex) {
alert(ex);
}
}
Совместимость с веб браузерами
Смотрите также