get_SaneScanSource Method
In This Topic
Gets name of scan source of SANE device.
Syntax
var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
var value; // Type: string
value = instance.get_SaneScanSource();
function get_SaneScanSource() : string;
Return Value
A name of scan source of SANE device.
Exceptions
Exception | Description |
| Thrown if device is not opened OR error occurs during getting value of device capability. |
Example
// Gets name of scan source of opened SANE device.
function getSaneScanSource(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;
}
console.log("Scan source: " + saneDevice.get_SaneScanSource());
}
catch (ex) {
alert(ex);
}
}
Browser Compatibility
See Also