Document Scanning on Linux with SANE and JavaScript

Dynamic Web TWAIN SDK is a scanning SDK designed for web application development. It helps developers to easily build document scanning apps with a few lines of JavaScript code. The preview of Dynamic Web TWAIN for Linux is available now. In this post, I will demonstrate how to configure a USB scanner, as well as how to run the online demo of Dynamic Web TWAIN on Ubuntu.

Hierarchy of Dynamic Web TWAIN

Dynamic Web TWAIN SDK covers Windows, Linux, and macOS.

Hierarchy of Dynamic Web TWAIN

How to Configure USB Scanner on Ubuntu

To test document scanning applications, the first step is to check whether the connected USB scanner can work by typing following command:

sudo scanimage -L

If there is no device detected, find the vendor ID and product ID:



Then manually add them to the corresponding scanner configuration file. Here is what I did for Fujitsu fi-7160:

sudo vim /etc/sane.d/fujitsu.conf

linux sane scanner conf

Save the configuration file and run the command “scanimage -L” again. The device now can be found:


The next step is to run the document scanning application.

Online Demo of Document Scanning

To experience the preview of Dynamic Web TWAIN for Linux, you can visit via Chrome or Firefox.

Install Dynamic Web TWAIN on Ubuntu

If it is your first time, you need to download and install the package dynamic_web_twainx64.deb.

Dynamic Web TWAIN not installed

You can either install the package with the terminal by typing command line or Ubuntu Software Center by double-clicking the .deb file.

Dynamic Web TWAIN installation on Linux

After installing Dynamic Web TWAIN for Linux, refresh the page. Select a listed USB scanner to scan documents.

document scanning on Ubuntu

As for how to develop a document scanning application in JavaScript, you can download the sample code and learn the API documentation. If you have any questions about Dynamic Web TWAIN for Linux, please feel free to contact


The video recorded what I mentioned above.

Search Blog Posts