In This Topic
Sets name of scan mode of SANE 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_SaneScanMode(value);
function set_SaneScanMode(
: string
) : any;
Parameters
- value
- A name of scan mode of SANE device.
Exceptions
Exception | Description |
| Thrown if device is not opened OR error occurs during setting value of device capability. |
Example
// Sets scan mode of opened SANE device.
function setSaneScanMode(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;
}
// set the "Color" scan mode for SANE device
saneDevice.set_SaneScanMode("Color");
console.log("Scan mode: " + saneDevice.get_SaneScanMode());
}
catch (ex) {
alert(ex);
}
}
Browser Compatibility
See Also