How to Set up Remote Document Scanning on Raspberry Pi

Since version 16.1, Dynamic Web TWAIN (DWT) has added a remote scan feature. If there is a device running a background scanning service (Dynamsoft Service), other devices can access it via an Intranet to use scanners connected to that device, which makes it convenient to use mobile phones to scan documents.

PS: Dynamsoft Service is the core piece of DWT when running in Service mode. It handles the communication between the hardware (scanner, webcam, etc.) and the browser, manages the image buffer, and coordinates data between different modules.1 You can learn more about how DWT and remote scan works in this post.

The recently released Dynamic Web TWAIN v17 has added support for ARM devices. The Dynamsoft Service can now run on ARM devices like Jetson Nano and Raspberry Pi.

Here we will go through how to set up remote document scanning on Raspberry Pi step by step.

What You Should Know About Dynamic Web TWAIN

Set up Remote Scanning on Raspberry Pi

Install Dynamsoft Service

  1. Visit the online demo of DWT:
  2. You will be prompted to download and install the Dynamsoft Service.


  3. Install the downloaded deb file with the following line:

     $ sudo dpkg -i DynamsoftServiceSetup-arm64.deb
  4. Then, you can scan documents from connected scanners on Raspberry Pi.

Enable Remote Scan on Raspberry Pi

We can visit to see if the Dynamsoft Service is running or not. But the service is only accessible in the local network.

We need to config it so that it is accessible in a shared network like a WLAN to enable remote scan.

  1. Open its config file with nano:

     $ nano /opt/dynamsoft/DynamsoftService/DSConfiguration.ini
  2. Add this line to the file (you have to change the IP based on your own condition):


    The entire config file looks like this:

     DSVersion=1, 6, 2, 0112
     ServiceName=Dynamsoft Service (64-bit)
  3. Restart the Dynamsoft Service to make the modification effective:

     $ sudo systemctl restart dynamsoft.service

    Visit http://<Intranet ip>:18622/ to see if it is accessible.

Scan Documents on Mobile Phones

First, we need to host the web pages on a machine. We can host them on Raspberry Pi or other devices.

  1. Download the remotescan demo:
  2. Download Dynamic Web TWAIN. Copy its Resources folder with the demo.
  3. Modify the remotescan.html to add the following line to specify the ip of the remote Dynamsoft Service:

     var ip = document.getElementById('remote');
     ip.options.add(new Option("","")); //Added line. The ip is for example.
     ip.options.add(new Option(window.location.hostname,window.location.hostname));
  4. Run an HTTP server using tools like Python:

     python -m http.server

Then, we can take our phone out and visit http://<the web page host's ip>:8000/remotescan.html. We can now use our phone to acquire images from the scanners connected to the Raspberry Pi.

remote scan mobile

PS: If you haven’t enabled remote scan, you may encounter such an error:



Search Blog Posts