This article is meant exclusively for the Service mode of Dynamic Web TWAIN.
Dynamsoft Service is the core piece of Dynamic Web TWAIN when running in Service mode. It handles the communication between hardware (scanner, webcam, etc.) and browser, manages the image buffer, and coordinates data between different modules.
The Dynamsoft Service uses
18625 ports for HTTP connection and
18626 ports for HTTPS connection.
These ports can be configured in the
DSConfiguration.ini file located in:
- On Windows, the service runs under the Local System account
- On macOS, the service runs under the current user account
- On Linux, the service runs under the root account
By default, there are three Dynamsoft Service processes running which use the same file
DynamsoftService.exe but initiated with different arguments:
The main process starts without any argument as follows:
Then there is a monitor process which is meant to monitor the main process and automatically start it in case it crashes. The monitor process starts like this:
C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64\DynamsoftService.exe -asmonitor Global\Dynamsoft_1.5.0_352325843_stop_service_event Global\Dynamsoft_1.5.0_352325828_certcheck_event
The last always-running process is meant to support the SSL certificate specifically for the Firefox browser:
"-scan" "\\.\pipe\dynamsoftscan_15.0_70056_60" "0" "Global\ss352604281_61_70056" "0" "C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64\dwt_trial_15.0.0.0625.dll"
Note: you may find another process named ‘Dynamsoft Scanning New Module’, which is a scan module. This process will start when you access an application integrated with Dynamic Web TWAIN, and will automatically stop when you close the application.
On a desktop, when a new user accesses a web page using Dynamic Web TWAIN SDK for the first time, he will be prompted to install the Dynamsoft Service. This is a built-in behaviour of the library. The prompt will display the download link. Once the installer is downloaded, the installation process will take just a few seconds.
The prompt comes up when you try to create a WebTwain instance in Service mode.
On Windows and macOS, the users can double click the downloaded installer to install the SDK.
On Linux, the users can run one of the following commands to install it:
Debian / Ubuntu
sudo dpkg -i DynamsoftServiceSetup.deb
sudo rpm -ivh DynamsoftServiceSetup.rpm
Once the installation is done, the users can click ‘Reconnect to the service’ or refresh the page to start using Dynamic Web TWAIN.
If Dynamsoft Service is not installed, users might receive the error ‘The Dynamic Web TWAIN module is not installed’ when accessing an application that uses Dynamic Web TWAIN.
If you see repeat prompt on installing the service, please check out Why is the browser prompting me to install Dynamsoft Service repeatedly?
There are multiple files and folders in the service directory. Taking Windows service (located at
C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64_16) as an example, the content is as follows:
\cache\: Data cached on the disk. Check out Disk Caching.
\cert\: The certificates used for SSL connection. Check out How to change the certificates.
\dump\: Dump files in case the service crashes.
\log\: Log files for debugging purposes.
\upload\: Temporary location for image data to be uploaded by the file uploader.
DSConfiguration.ini: Service configuration file. Check out How to configure the service.
DWASManager_16000428.dll: The service manager. The name of the file may vary among different versions.
DynamsoftService.exe: The service.
DynamicSocket.dll: For socket connections.
service.ini: Define service name.
user_config.ini: User configuration file.
welcome.htm: The home page for the service (present when you visit http://127.0.0.1:18625)
These files are named with their version number. The following uses v16.1.1 as an example.
DynamicPdfR_11.0.0.0428.dll(for the PDF Rasterizer)
DynamicPdfRx64_11.0.0.0428.dll(for the PDF Rasterizer)
favicon.ico: The favicon.
legal.txt: Legal notice.
libcurl.dll: The file transfer library.
In this article: