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