Skip to content

Commit ef555bc

Browse files
authored
web twain 19.2
2 parents 8f96ce4 + 67fe1b1 commit ef555bc

File tree

22 files changed

+208
-118
lines changed

22 files changed

+208
-118
lines changed

_articles/extended-usage/buffer-caching.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ var storageItemUid = await DWTObject.createLocalStorage(folderSettings);
4848

4949
Please ensure to set a strong password to enhance data security, especially in multi-user login scenarios.
5050

51-
The local directory of the created storage folder is under
52-
- Windows: `C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN Service {versionnumber}\storage`(version 18.5.1 and earlier `C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64_{versionnumber}\storage`)
53-
- macOS: `Go > Applications > Dynamsoft > Dynamic Web TWAIN Service {versionnumber} > storage`(version 18.5.1 and earlier `Go > Applications > Dynamsoft > DynamsoftServicex64_{versionnumber} > {installed version No.} > storage`)
54-
- Linux: `/opt/dynamsoft/Dynamic Web TWAIN Service {versionnumber}/storage`(version 18.5.1 and earlier `/opt/dynamsoft/DynamsoftService/storage`)
51+
The local directory of the created storage folder is under the service's [intallation folder](/_articles/extended-usage/dynamsoft-service-configuration.md#installation-folder).
5552

5653
**Save image caches**
5754

_articles/extended-usage/dynamsoft-service-configuration.md

Lines changed: 70 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,58 @@ description: Dynamic Web TWAIN SDK Documentation Dynamic Web TWAIN Service Page
1010

1111
# Configuring the Dynamic Web TWAIN Service
1212

13-
> This article is meant exclusively for the Desktop Service Edition of Dynamic Web TWAIN.
13+
The Dynamic Web TWAIN Service is the core piece of Dynamic Web TWAIN. It handles the communication between hardware (scanner, webcam, etc.) and browser, manages the image buffer, and coordinates data between different modules.
1414

15-
The Dynamic Web TWAIN 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.
15+
16+
## Installation of Dynamic Web TWAIN Service
17+
18+
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 Dynamic Web TWAIN Service. This is a built-in behavior of the library. The prompt will display the download link. Once the installer is downloaded, the installation process will take just a few seconds.
19+
20+
The prompt comes up when you try to [create a WebTwain instance](/_articles/extended-usage/advanced-initialization.md#instantiating-webtwain-without-onwebtwainready).
21+
22+
![Initialization](/assets/imgs/Initialization-1.png)
23+
24+
On **Windows and macOS**, double click the downloaded installer to install the service.
25+
26+
On **Linux**, instead of double clicking, the downloaded installer needs to be run using one of the following commands:
27+
28+
- Debian / Ubuntu
29+
30+
```bash
31+
sudo dpkg -i DynamicWebTWAINServiceSetup.deb
32+
```
33+
34+
- Fedora
35+
36+
```bash
37+
sudo rpm -ivh DynamicWebTWAINServiceSetup.rpm
38+
```
39+
40+
Once the installation is done, the users can click the orange sentence 'click here to verify completion' or refresh the page to start using Dynamic Web TWAIN.
41+
42+
![Initialization](/assets/imgs/Initialization-2.png)
43+
44+
## Installation Folder
45+
46+
The service is installed in the following folders on different platforms by default.
47+
48+
- Windows:
49+
- version 19.0 and later: `C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN Service {versionnumber}`
50+
- version 18.5.1 and earlier: `C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64_{versionnumber}`)
51+
- macOS:
52+
- version 19.2 and later: `/Users/{username}/Applications/Dynamsoft/Dynamic Web TWAIN Service {versionnumber}`
53+
- version 19.0-19.1: `/Applications/Dynamsoft/Dynamic Web TWAIN Service {versionnumber}`
54+
- version 18.5.1 and earlier: `/Applications/Dynamsoft/DynamsoftServicex64_{versionnumber}/{installed version No.}`)
55+
- Linux:
56+
- version 19.0 and later: `/opt/dynamsoft/Dynamic Web TWAIN Service {versionnumber}`
57+
- version 18.5.1 and earlier: `/opt/dynamsoft/DynamsoftService`
1658

1759
## IP and ports
1860

1961
The Dynamic Web TWAIN Service uses `localhost` and `18622` `18625` ports for HTTP connection and `18623` `18626` ports for HTTPS connection.
20-
These ports can be configured in the `DSConfiguration.ini` file located in:
21-
- Windows: `C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN Service {versionnumber}`(version 18.5.1 and earlier `C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64_{versionnumber}`)
22-
- macOS: `Go > Applications > Dynamsoft > Dynamic Web TWAIN Service {versionnumber}`(version 18.5.1 and earlier `Go > Applications > Dynamsoft > DynamsoftServicex64_{versionnumber} > {installed version No.}`)
23-
- Linux: `/opt/dynamsoft/Dynamic Web TWAIN Service {versionnumber}`(version 18.5.1 and earlier `/opt/dynamsoft/DynamsoftService`)
62+
63+
These ports can be configured in the `DSConfiguration.ini` file located in the service's installatin folder.
64+
2465

2566
## Access-Control-Allow-Origin
2667

@@ -58,33 +99,40 @@ When a request comes from a different origin, a CORS error message will be displ
5899

59100
![CORS-error-console](/assets/imgs/CORS-error-console.png)
60101

61-
## Installation of Dynamic Web TWAIN Service
62102

63-
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 Dynamic Web TWAIN Service. This is a built-in behavior of the library. The prompt will display the download link. Once the installer is downloaded, the installation process will take just a few seconds.
103+
## Web Setup
64104

65-
The prompt comes up when you try to [create a WebTwain instance](/_articles/extended-usage/advanced-initialization.md#instantiating-webtwain-without-onwebtwainready) in Service mode.
105+
The service provides a web page to know its status and make basic configurations. You can access it through <http://127.0.0.1:18625>.
66106

67-
![Initialization](/assets/imgs/Initialization-1.png)
107+
For security reasons, the web setup is disabled by default. You can add the following line to `DSConfiguration.ini` to enable it.
68108

69-
On **Windows and macOS**, double click the downloaded installer to install the service.
109+
```
110+
EnableWebSetup=TRUE
111+
```
70112

71-
On **Linux**, instead of double clicking, the downloaded installer needs to be run using one of the following commands:
113+
Screenshots:
72114

73-
- Debian / Ubuntu
115+
* Default:
74116

75-
```bash
76-
sudo dpkg -i DynamicWebTWAINServiceSetup.deb
77-
```
117+
![home](/assets/imgs/service-web-setup/home.jpg)
78118

79-
- Fedora
119+
* External Access Tab:
80120

81-
```bash
82-
sudo rpm -ivh DynamicWebTWAINServiceSetup.rpm
83-
```
121+
![external access setup](/assets/imgs/service-web-setup/external-access-setup.jpg)
84122

85-
Once the installation is done, the users can click the orange sentence 'click here to verify completion' or refresh the page to start using Dynamic Web TWAIN.
123+
On the left of the page, you can check the service's status and update the [`LogLevel`](/_articles/info/api/WebTwain_Util.md#loglevel).
124+
125+
On the right of the page, you can configure the service through the local access tab and the external access tab.
126+
127+
In the local access tab, you can update the SSL certificate for domains bound to `127.0.0.1`.
128+
129+
In the external access tab, you can update the following settings:
130+
131+
1. Host: configure an external IP so that it can be accessed by other devices.
132+
2. Firewall exception: add exception rules to the firewall to avoid the traffic being blocked by the firewall (only for Windows).
133+
3. Domain: bind a domain to the IP of your service and configure its SSL certificate.
134+
4. Bonjour service: enable Bonjour service to allow service discovery in local networks. It is needed for the [Remote Scan solution](https://www.dynamsoft.com/remote-scan/docs/introduction/).
86135

87-
![Initialization](/assets/imgs/Initialization-2.png)
88136

89137
## Msg: Dynamic Web TWAIN Service is not installed / Dynamic Web TWAIN is not installed
90138

_articles/faq/dwt-with-annotation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Deliver the SDK dependencies with either the [jsDelivr](https://jsdelivr.com/) o
3434

3535
```html
3636
<!--Dynamic Web TWAIN-->
37-
<script src="https://cdn.jsdelivr.net/npm/dwt@19.1.0/dist/dynamsoft.webtwain.min.js"></script>
37+
<script src="https://cdn.jsdelivr.net/npm/dwt@19.2.0/dist/dynamsoft.webtwain.min.js"></script>
3838
<!--Dynamsoft Document Viewer-->
3939
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@3.0.0/dist/ddv.js"></script>
4040
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@3.0.0/dist/ddv.css">
@@ -44,7 +44,7 @@ Deliver the SDK dependencies with either the [jsDelivr](https://jsdelivr.com/) o
4444

4545
```html
4646
<!--Dynamic Web TWAIN-->
47-
<script src="https://unpkg.com/dwt@19.1.0/dist/dynamsoft.webtwain.min.js"></script>
47+
<script src="https://unpkg.com/dwt@19.2.0/dist/dynamsoft.webtwain.min.js"></script>
4848
<!--Dynamsoft Document Viewer-->
4949
<script src="https://unpkg.com/dynamsoft-document-viewer@3.0.0/dist/ddv.js"></script>
5050
<link rel="stylesheet" href="https://unpkg.com/dynamsoft-document-viewer@3.0.0/dist/ddv.css">
@@ -120,7 +120,7 @@ API Reference
120120
// You can request a 30-day trial key from https://www.dynamsoft.com/customer/license/trialLicense/?product=dwtddv
121121
Dynamsoft.DWT.ProductKey = "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9";
122122
Dynamsoft.DWT.UseDefaultViewer = false;
123-
Dynamsoft.DWT.ResourcesPath = "https://cdn.jsdelivr.net/npm/dwt@19.1.0/dist";
123+
Dynamsoft.DWT.ResourcesPath = "https://cdn.jsdelivr.net/npm/dwt@19.2.0/dist";
124124
// You need to set the service installer location here since the installer's size exceeds jsdelivr's limit. You'd better host the installers in your own environment.
125125
Dynamsoft.DWT.ServiceInstallerLocation = 'https://download2.dynamsoft.com/Demo/DWT/Resources/dist/';
126126

@@ -279,7 +279,7 @@ API Reference
279279
<html>
280280
<head>
281281
<title>HelloWorld</title>
282-
<script src=" https://cdn.jsdelivr.net/npm/dwt@19.1.0/dist/dynamsoft.webtwain.min.js"></script>
282+
<script src=" https://cdn.jsdelivr.net/npm/dwt@19.2.0/dist/dynamsoft.webtwain.min.js"></script>
283283
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@3.0.0/dist/ddv.js"></script>
284284
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@3.0.0/dist/ddv.css">
285285
</head>
@@ -316,7 +316,7 @@ let DWObject, editViewer, ddvDoc;
316316
// Create Dynamic Web TWAIN object
317317
Dynamsoft.DWT.ProductKey = license;
318318
Dynamsoft.DWT.UseDefaultViewer = false;
319-
Dynamsoft.DWT.ResourcesPath = "https://cdn.jsdelivr.net/npm/dwt@19.1.0/dist";
319+
Dynamsoft.DWT.ResourcesPath = "https://cdn.jsdelivr.net/npm/dwt@19.2.0/dist";
320320
// You need to set the service installer location here since the installer's size exceeds jsdelivr's limit. You'd better host the installers in your own environment.
321321
Dynamsoft.DWT.ServiceInstallerLocation = 'https://download2.dynamsoft.com/Demo/DWT/Resources/dist/';
322322

_articles/general-usage/image-export/local-export.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ The Base 64 string accessible through the `result` argument of the success callb
8787

8888
## Print
8989

90-
Finally, DWT can also print directly to a printer through the [ `Print()` ](/_articles/info/api/WebTwain_IO.md#print) API. This API brings all images from the image buffer into the browser's print dialog. Alternatively, while running in Windows Service Mode, the API can also take an argument to use the Windows OS print dialog instead.
90+
Finally, DWT can also print directly to a printer through the [ `Print()` ](/_articles/info/api/WebTwain_IO.md#print) API. This API brings all images from the image buffer into the browser's print dialog. Alternatively, while running on Windows, the API can also take an argument to use the Windows OS print dialog instead.

_articles/general-usage/resource-loading.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The official SDK installers store the installers under the `/dist` directory, an
2121

2222
The official [DWT installer](https://www.dynamsoft.com/web-twain/downloads) installs the SDK with a 30-day free trial (license key included), and contains the resource scripts, along with SDK documentation, and samples. This method is useful for developers to quickly evaluate the SDK. The resource files may be obtained from the following locations after installation:
2323

24-
- On Windows: `C:\Program Files (x86)\Dynamsoft\Dynamic WebTWAIN SDK {version number}/Resources`
24+
- On Windows: `C:\Program Files (x86)\Dynamsoft\Dynamic WebTWAIN SDK {version number}\Resources`
2525
- On Linux: Where you extracted the SDK archive file to - `{extracted directory}/Dynamic Web TWAIN SDK {version number}/Resources`
2626
- On MacOS: `/Applications/Dynamsoft/Dynamic Web TWAIN SDK {version number}/Resources`
2727

@@ -95,6 +95,7 @@ Note that jsDelivr currently has problems delivering the Dynamic Web TWAIN Servi
9595
<script>
9696
Dynamsoft.DWT.ResourcesPath = "https://cdn.jsdelivr.net/npm/dwt@latest/dist"; // Load supporting resources from here
9797
Dynamsoft.DWT.ProductKey = ""; // Add product key here
98+
Dynamsoft.DWT.ServiceInstallerLocation = 'https://unpkg.com/dwt/dist/dist/'; // Set the service installers' location
9899
</script>
99100
</body>
100101
</html>

_articles/hello-world/scanning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Create a `HelloWorld.html` file anywhere and copy the `Resources` folder to the
2121

2222
- Windows: `C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN SDK {Version Number}\`
2323
- Linux: Within the decompressed file `Dynamic Web TWAIN SDK {Version Number}/`
24-
- MacOS: `Applications/Dynamsoft/Dynamic Web TWAIN SDK {Version Number}/`
24+
- MacOS: `/Applications/Dynamsoft/Dynamic Web TWAIN SDK {Version Number}/`
2525

2626
### Include the DWT Scripts
2727

_articles/indepth/development/angular.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ng new dwt-angular
2828
### **cd** to the root directory of the application and install the dependencies
2929

3030
``` cmd
31-
npm install dwt@19.1.0
31+
npm install dwt@19.2.0
3232
```
3333

3434
## Configure the project

_articles/indepth/development/react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ npm install
4040
```
4141

4242
``` cmd
43-
npm install dwt@19.1.0 ncp
43+
npm install dwt@19.2.0 ncp
4444
```
4545

4646
> `ncp` is used to copy static resources files.

_articles/indepth/development/vue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ vue create dwt-vue
3333
### Navigate to the root directory of the application and install the `dwt` and `ncp` package
3434

3535
``` cmd
36-
yarn add dwt@19.1.0
36+
yarn add dwt@19.2.0
3737
```
3838

3939
``` cmd
@@ -232,7 +232,7 @@ npm install
232232
```
233233

234234
``` cmd
235-
npm install dwt@19.1.0
235+
npm install dwt@19.2.0
236236
```
237237

238238
``` cmd

_articles/info/api/WebTwain_Buffer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ GetImagePartURL(index: number, width: number, height: number): string;
942942

943943
The returned URL looks like this: 'dwt://dwt_trial_13000404/img?id=306159652&index=0&t=1502184632022'.
944944

945-
You get the original size (a, b) of the image in PNG format in Service Mode
945+
You get the original size (a, b) of the image in PNG format
946946

947947
- if either width or height is not set or
948948
- if either width or height is set to -1 or
@@ -999,7 +999,7 @@ GetImageURL(index: number, width: number, height: number): string;
999999

10001000
The returned URL looks like this: "https://127.0.0.1:18623/dwt/dwt_17110818/img?id=795151779&index=1&t=1640936181588".
10011001

1002-
You get the original size (a, b) of the image in PNG format in Service Mode
1002+
You get the original size (a, b) of the image in PNG format
10031003

10041004
- if either width or height is not set or
10051005
- if either width or height is set to -1 or
@@ -1713,9 +1713,9 @@ IsBlankImageAsync(index: number,
17131713

17141714
<tr>
17151715
<td align="center">v18.4+</td>
1716-
<td align="center">N/A</td>
1717-
<td align="center">N/A</td>
1718-
<td align="center">N/A</td>
1716+
<td align="center">v19.2+</td>
1717+
<td align="center">v19.2+</td>
1718+
<td align="center">v19.2+</td>
17191719
</tr>
17201720

17211721
</table>

0 commit comments

Comments
 (0)