In This Topic
eSCL is a driverless scanning protocol developed by the Mopria Alliance. eSCL is a RESTful interface to scanners, designed to simplify client-side scanning by requiring only the specification of an intent.
VintaSoft TWAIN .NET SDK provides the eSCL device manager that provides access to the eSCL devices.
For working with eSCL device manager it is necessary to create an instance of
EsclDeviceManager class.
Here is an example that demonstrates how to open eSCL device manager and display information about all available eSCL devices:
/// <summary>
/// Opens eSCL device manager and displays information about available local eSCL image scanners.
/// </summary>
void GetEsclDevicesInfo()
{
// create eSCL device manager
using (Vintasoft.EsclImageScanning.EsclDeviceManager deviceManager = new Vintasoft.EsclImageScanning.EsclDeviceManager())
{
// open device manager
deviceManager.Open();
// wait while the eSCL device manager searches for eSCL devices
System.Threading.Thread.Sleep(deviceManager.DeviceSearchTimeout);
// get count of eSCL devices
int deviceCount = deviceManager.Devices.Count;
if (deviceCount == 0)
{
System.Console.WriteLine("Devices are not found.");
return;
}
Vintasoft.EsclImageScanning.EsclDeviceCollection devices = deviceManager.Devices;
// for each eSCL device
for (int i = 0; i < devices.Count; i++)
{
// output the device name
System.Console.WriteLine(string.Format("Device '{0}'", devices[i].Name));
}
}
}
''' <summary>
''' Opens eSCL device manager and displays information about available local eSCL image scanners.
''' </summary>
Private Sub GetEsclDevicesInfo()
' create eSCL device manager
Using deviceManager As New Vintasoft.EsclImageScanning.EsclDeviceManager()
' open device manager
deviceManager.Open()
' wait while the eSCL device manager searches for eSCL devices
System.Threading.Thread.Sleep(deviceManager.DeviceSearchTimeout)
' get count of eSCL devices
Dim deviceCount As Integer = deviceManager.Devices.Count
If deviceCount = 0 Then
System.Console.WriteLine("Devices are not found.")
Return
End If
Dim devices As Vintasoft.EsclImageScanning.EsclDeviceCollection = deviceManager.Devices
' for each eSCL device
For i As Integer = 0 To devices.Count - 1
' output the device name
System.Console.WriteLine(String.Format("Device '{0}'", devices(i).Name))
Next
End Using
End Sub