In This Topic
Sets the scan intent for WIA/eSCL device.
Syntax
var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
var returnValue; // Type: any
// Parameters
var value; // Type: string
returnValue = instance.set_ScanIntent(value);
function set_ScanIntent(
: string
) : any;
Parameters
- value
- The scan intent for WIA/eSCL device.
Possible values for WIA device: "None", "ColorImage", "GrayscaleImage", "Text", "Mask".
Exceptions
| Exception | Description |
| Thrown if device is not opened OR error occurs during setting value of device capability. |
Example
// Sets scan intent of opened WIA/eSCL device.
function setScanIntent(device) {
try {
console.log("Device: " + device.get_DeviceName());
// if device is not opened
if (!device.get_IsOpened()) {
console.log("Device is not opened. Please open device.");
return;
}
// set the 'ColorImage' intent as the scan intent for WIA device
wiaDevice.set_ScanIntent("ColorImage");
console.log("Scan intent: " + device.get_ScanIntent());
}
catch (ex) {
alert(ex);
}
}
Browser Compatibility
See Also