An Overview of Scanning Over a Shared Network

Dynamic Web TWAIN (DWT)’s Remote Scan feature makes it possible to scan documents from your scanner or multi-function printer (MFP) directly to any device.

You may wonder what other network scanning options exist. This article is going to give a brief overview of scanning over the network and why DWT’s solution is a better option.

Existing Options

The Operating System’s Sharing Function

It is possible to share a printer on Windows. However, it is not possible to share a document scanner. A multi-function device can be shared but we cannot use its scanning ability.

Saned

On Linux, we can share USB-connected scanners through an Intranet using saned.

You can learn about how to set it up by seeing Debian’s wiki.

After the setup, we can scan on any devices with sane installed like mobile scanning on Android devices using SANEDroid.

Cons:

  1. It requires running sane on the client.
  2. It only supports USB-connected scanners.
  3. It does not support auto-discovery. Users have to input the IP of the server manually.

eSCL

Many scanners now support a protocol called eSCL. It is a vendor-neutral network protocol that allows driverless scanning via ethernet, wireless and USB connected devices. It uses Bonjour for auto-discovery.

eSCL is also known as Apple AirScan which is promoted by Apple.

eSCL is a simple XML and HTTP based protocol. You can find its full specification on Mopria.org.

Here is a simple Python script that creates a scanning job and saves the scanned document using the eSCL protocol (This works for HP Officejet Pro 6970):

from requests import get as requests_get, post as requests_post

def scan():

    scanner_ip = "192.168.8.66"

    xml = '''<scan:ScanSettings xmlns:scan="http://schemas.hp.com/imaging/escl/2011/05/03" xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" xmlns:dd3="http://www.hp.com/schemas/imaging/con/dictionaries/2009/04/06" xmlns:fw="http://www.hp.com/schemas/imaging/con/firewall/2011/01/05" xmlns:scc="http://schemas.hp.com/imaging/escl/2011/05/03" xmlns:pwg="http://www.pwg.org/schemas/2010/12/sm"><pwg:Version>2.1</pwg:Version><scan:Intent>Photo</scan:Intent><pwg:ScanRegions><pwg:ScanRegion><pwg:Height>3300</pwg:Height><pwg:Width>2550</pwg:Width><pwg:XOffset>0</pwg:XOffset><pwg:YOffset>0</pwg:YOffset></pwg:ScanRegion></pwg:ScanRegions><pwg:InputSource>Platen</pwg:InputSource><scan:DocumentFormatExt>image/jpeg</scan:DocumentFormatExt><scan:XResolution>300</scan:XResolution><scan:YResolution>300</scan:YResolution><scan:ColorMode>Grayscale8</scan:ColorMode><scan:CompressionFactor>25</scan:CompressionFactor><scan:Brightness>1000</scan:Brightness><scan:Contrast>1000</scan:Contrast></scan:ScanSettings>'''

    resp = requests_post('http://{0}/eSCL/ScanJobs'.format(scanner_ip), data=xml, headers={'Content-Type': 'text/xml'})
    if resp.status_code == 201:
        url = '{0}/NextDocument'.format(resp.headers['Location'])
        r = requests_get(url) 
        with open("scanned.jpg",'wb') as f:
            f.write(r.content)
    
scan()

Due to the CORS policy, it is not possible to directly use eSCL in JavaScript.

eSCL is supported by macOS and Linux with the sane-airscan backend.

WSD

Another vendor-neutral network protocol similar to eSCL is based on Microsoft’s Web Services for Devices framework. This protocol is called WSD.

WSD is supported by Windows and Linux with the sane-airscan backend.

Not all scanners support both WSD and eSCL. Some may only support WSD and some may only support eSCL.

DWT’s Remote Scan Solution

Dynamic Web TWAIN runs a local service called Dynamsoft Service to interact with scanners and web clients. The service can run on Windows, Linux and macOS and supports scanner APIs like TWAIN, ICA and SANE.

When the remote scan feature is enabled, other devices on the Intranet can contact the service to scan documents. Dynamic Web TWAIN provides an easy-to-use web SDK to implement a web document scanner.

Here are the pros of DWT’s remote scan:

  1. It is a driverless scanning solution.
  2. It runs on end-users’ web browsers on any device with no extra software required.
  3. It supports USB-connected scanners as well as network scanners.
  4. Easy setup. You only need to specify which Intranet IP to use.

Remote Scan

Download Dynamic Web TWAIN to have a try on your own.

Search Blog Posts