getSupportedScanIntents Method
In This Topic
Returns names of supported scan intents for opened WIA/eSCL device.
Syntax
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
An array that contains names of supported scan intents of WIA/eSCL device.
Exceptions
| Exception | Description |
| Thrown if device is not opened OR error occurs during getting value of device capability. |
Example
// 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);
}
}
Browser Compatibility
See Also