dwt 19.0.0 → 19.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +136 -58
- package/dist/dist/DynamicWebTWAINServiceSetup-arm64.deb +0 -0
- package/dist/dist/DynamicWebTWAINServiceSetup.deb +0 -0
- package/dist/dist/DynamicWebTWAINServiceSetup.msi +0 -0
- package/dist/dist/DynamicWebTWAINServiceSetup.pkg +0 -0
- package/dist/dist/DynamicWebTWAINServiceSetup.rpm +0 -0
- package/dist/dynamsoft.webtwain.min.js +43 -34
- package/dist/dynamsoft.webtwain.min.mjs +43 -34
- package/dist/src/dynamsoft.lts.js +10 -10
- package/dist/src/dynamsoft.webtwain.css +4 -4
- package/dist/src/dynamsoft.webtwain.viewer.css +3 -3
- package/dist/src/dynamsoft.webtwain.viewer.js +3 -3
- package/dist/types/Addon.BarcodeReader.d.ts +1 -1
- package/dist/types/Addon.Webcam.d.ts +6 -6
- package/dist/types/Dynamsoft.d.ts +2 -2
- package/dist/types/RemoteScan.d.ts +3 -3
- package/dist/types/WebTwain.Acquire.d.ts +7 -3
- package/dist/types/WebTwain.Buffer.d.ts +4 -0
- package/dist/types/WebTwain.Edit.d.ts +4 -4
- package/dist/types/WebTwain.IO.d.ts +7 -7
- package/dist/types/WebTwain.Util.d.ts +1 -1
- package/dist/types/WebTwain.Viewer.d.ts +61 -11
- package/dist/types/index.d.ts +1 -6
- package/dwt-openapi.yaml +31 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
[Dynamic Web TWAIN](https://www.dynamsoft.com/web-twain/overview/) is a cross-platform scanning SDK designed for web document management applications. With just a few lines of JavaScript code, you can develop robust web applications to scan documents, edit images and save them to file systems. To see it in action, please visit <a href="https://demo.dynamsoft.com/web-twain/" target="_blank">**this online demo**</a>
|
|
7
7
|
|
|
8
|
-
Note: Dynamic Web TWAIN SDK **v19.
|
|
8
|
+
Note: Dynamic Web TWAIN SDK **v19.2** is built in this package. For more detail, check the [Version Info](#versions).
|
|
9
9
|
|
|
10
10
|
## Table of Contents
|
|
11
11
|
- [Supported Environments](#supported-environments)
|
|
@@ -63,8 +63,6 @@ Note: Dynamic Web TWAIN SDK **v19.0** is built in this package. For more detail,
|
|
|
63
63
|
If you do not have a physical scanner to test on Windows, you can install a virtual scanner.
|
|
64
64
|
- [Virtual Scanner for Windows](https://download.dynamsoft.com/tool/twainds.win32.installer.2.1.3.msi)
|
|
65
65
|
|
|
66
|
-
Read more [here](https://www.dynamsoft.com/web-twain/docs/getstarted/hardware.html?ver=latest#no-scanner-to-test).
|
|
67
|
-
|
|
68
66
|
## Deployment
|
|
69
67
|
|
|
70
68
|
Dynamic Web TWAIN relies on the files in the `/dist/` folder to work. Make sure to put these files on your server and correctly refer to them by specifying the path with `ResourcesPath` (relative and absolute paths are both fine).
|
|
@@ -74,39 +72,74 @@ If you are making use of the `CDN` [jsDelivr](https://cdn.jsdelivr.net/npm/dwt),
|
|
|
74
72
|
## Quick Start
|
|
75
73
|
|
|
76
74
|
### Step 1 Create a HTML page and load **`dynamsoft.webtwain.min.js`** into your page:
|
|
75
|
+
- jsDelivr
|
|
76
|
+
```html
|
|
77
|
+
<!DOCTYPE html>
|
|
78
|
+
<html>
|
|
79
|
+
<head>
|
|
80
|
+
<title>Hello World</title>
|
|
81
|
+
<script src="https://cdn.jsdelivr.net/npm/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
82
|
+
</head>
|
|
83
|
+
<body>
|
|
84
|
+
</body>
|
|
85
|
+
</html>
|
|
86
|
+
```
|
|
77
87
|
|
|
78
|
-
|
|
88
|
+
- UNPKG
|
|
89
|
+
```html
|
|
79
90
|
<!DOCTYPE html>
|
|
80
91
|
<html>
|
|
81
92
|
<head>
|
|
82
|
-
|
|
83
|
-
|
|
93
|
+
<title>Hello World</title>
|
|
94
|
+
<script src="https://unpkg.com/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
84
95
|
</head>
|
|
85
96
|
<body>
|
|
86
97
|
</body>
|
|
87
98
|
</html>
|
|
88
|
-
|
|
99
|
+
```
|
|
89
100
|
|
|
90
|
-
> Note that
|
|
101
|
+
> Note that an **absolute path** is used here. Depending on the location of the code, you can modify it to a **relative path**. The best practice is to put all the files on your own server and under the same domain as your web application.
|
|
91
102
|
|
|
92
103
|
### Step 2 Add a script tag and make initial settings:
|
|
93
104
|
|
|
94
|
-
|
|
105
|
+
- jsDelivr
|
|
106
|
+
```html
|
|
95
107
|
<!DOCTYPE html>
|
|
96
108
|
<html>
|
|
97
109
|
<head>
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
<title>Hello World</title>
|
|
111
|
+
<script src="https://cdn.jsdelivr.net/npm/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
100
112
|
</head>
|
|
101
113
|
<body>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
114
|
+
<script type="text/javascript">
|
|
115
|
+
Dynamsoft.DWT.ResourcesPath = "https://cdn.jsdelivr.net/npm/dwt@latest/dist";
|
|
116
|
+
//You need to set the service installer location here since the installer's size exceeds jsdelivr's limit.
|
|
117
|
+
//You'd better host the installers in your own environment.
|
|
118
|
+
Dynamsoft.DWT.ServiceInstallerLocation = 'https://unpkg.com/dwt/dist/dist/';
|
|
119
|
+
Dynamsoft.DWT.ProductKey = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
|
|
105
120
|
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
106
|
-
|
|
121
|
+
</script>
|
|
107
122
|
</body>
|
|
108
123
|
</html>
|
|
109
|
-
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- UNPKG
|
|
127
|
+
```html
|
|
128
|
+
<!DOCTYPE html>
|
|
129
|
+
<html>
|
|
130
|
+
<head>
|
|
131
|
+
<title>Hello World</title>
|
|
132
|
+
<script src="https://unpkg.com/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
133
|
+
</head>
|
|
134
|
+
<body>
|
|
135
|
+
<script type="text/javascript">
|
|
136
|
+
Dynamsoft.DWT.ResourcesPath = "https://unpkg.com/dwt@latest/dist";
|
|
137
|
+
Dynamsoft.DWT.ProductKey = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
|
|
138
|
+
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
139
|
+
</script>
|
|
140
|
+
</body>
|
|
141
|
+
</html>
|
|
142
|
+
```
|
|
110
143
|
|
|
111
144
|
> Note that `ResourcesPath` must be set in order to use the library.
|
|
112
145
|
|
|
@@ -116,47 +149,92 @@ If you are making use of the `CDN` [jsDelivr](https://cdn.jsdelivr.net/npm/dwt),
|
|
|
116
149
|
|
|
117
150
|
### Step 3 Write code to use the package to do a simple document scan
|
|
118
151
|
|
|
119
|
-
> The following code demonstrates the minimum code needed to use the package. Note the addition of HTML elements as well as JavaScript code. For more sophisticated sample or demo, check out the [Sample Gallery](https://www.dynamsoft.com/web-twain/resources/code-gallery/) and our [Github Repositories](https://github.com/dynamsoft-
|
|
152
|
+
> The following code demonstrates the minimum code needed to use the package. Note the addition of HTML elements as well as JavaScript code. For more sophisticated sample or demo, check out the [Sample Gallery](https://www.dynamsoft.com/web-twain/resources/code-gallery/) and our [Github Repositories](https://github.com/dynamsoft/web-twain-samples).
|
|
153
|
+
|
|
154
|
+
- jsDelivr
|
|
155
|
+
```html
|
|
156
|
+
<!DOCTYPE html>
|
|
157
|
+
<html>
|
|
158
|
+
<head>
|
|
159
|
+
<title>Hello World</title>
|
|
160
|
+
<script src="https://cdn.jsdelivr.net/npm/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
161
|
+
</head>
|
|
162
|
+
<body>
|
|
163
|
+
<button onclick="AcquireImage();">Scan</button>
|
|
164
|
+
<div id="dwtcontrolContainer"></div>
|
|
165
|
+
<script type="text/javascript">
|
|
166
|
+
Dynamsoft.DWT.ResourcesPath = "https://cdn.jsdelivr.net/npm/dwt@latest/dist";
|
|
167
|
+
//You need to set the service installer location here since the installer's size exceeds jsdelivr's limit.
|
|
168
|
+
//You'd better host the installers in your own environment.
|
|
169
|
+
Dynamsoft.DWT.ServiceInstallerLocation = 'https://unpkg.com/dwt/dist/dist/';
|
|
170
|
+
Dynamsoft.DWT.ProductKey = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
|
|
171
|
+
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
172
|
+
window.onload = function () {
|
|
173
|
+
Dynamsoft.DWT.Load();
|
|
174
|
+
};
|
|
175
|
+
var DWTObject;
|
|
176
|
+
Dynamsoft.DWT.RegisterEvent("OnWebTwainReady", function() {
|
|
177
|
+
// dwtcontrolContainer is the id of the DIV to create the WebTwain instance in.
|
|
178
|
+
DWTObject = Dynamsoft.DWT.GetWebTwain('dwtcontrolContainer');
|
|
179
|
+
});
|
|
180
|
+
function AcquireImage() {
|
|
181
|
+
if (DWTObject) {
|
|
182
|
+
DWTObject.SelectSourceAsync().then(function(){
|
|
183
|
+
return DWTObject.AcquireImageAsync({
|
|
184
|
+
PixelType: Dynamsoft.DWT.EnumDWT_PixelType.TWPT_RGB,
|
|
185
|
+
Resolution: 200,
|
|
186
|
+
IfCloseSourceAfterAcquire: true
|
|
187
|
+
});
|
|
188
|
+
}).catch(function (exp) {
|
|
189
|
+
alert(exp.message);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
</script>
|
|
194
|
+
</body>
|
|
195
|
+
</html>
|
|
196
|
+
```
|
|
120
197
|
|
|
121
|
-
|
|
198
|
+
- UNPKG
|
|
199
|
+
```html
|
|
122
200
|
<!DOCTYPE html>
|
|
123
201
|
<html>
|
|
124
202
|
<head>
|
|
125
|
-
|
|
126
|
-
|
|
203
|
+
<title>Hello World</title>
|
|
204
|
+
<script src="https://unpkg.com/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
127
205
|
</head>
|
|
128
206
|
<body>
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
207
|
+
<button onclick="AcquireImage();">Scan</button>
|
|
208
|
+
<div id="dwtcontrolContainer"></div>
|
|
209
|
+
<script type="text/javascript">
|
|
210
|
+
Dynamsoft.DWT.ResourcesPath = "https://unpkg.com/dwt@latest/dist";
|
|
211
|
+
Dynamsoft.DWT.ProductKey = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9'; // Put your own key here
|
|
134
212
|
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
213
|
+
window.onload = function () {
|
|
214
|
+
Dynamsoft.DWT.Load();
|
|
215
|
+
};
|
|
216
|
+
var DWTObject;
|
|
217
|
+
Dynamsoft.DWT.RegisterEvent("OnWebTwainReady", function() {
|
|
218
|
+
// dwtcontrolContainer is the id of the DIV to create the WebTwain instance in.
|
|
219
|
+
DWTObject = Dynamsoft.DWT.GetWebTwain('dwtcontrolContainer');
|
|
220
|
+
});
|
|
221
|
+
function AcquireImage() {
|
|
222
|
+
if (DWTObject) {
|
|
223
|
+
DWTObject.SelectSourceAsync().then(function(){
|
|
224
|
+
return DWTObject.AcquireImageAsync({
|
|
225
|
+
PixelType: Dynamsoft.DWT.EnumDWT_PixelType.TWPT_RGB,
|
|
226
|
+
Resolution: 200,
|
|
149
227
|
IfCloseSourceAfterAcquire: true
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
228
|
+
});
|
|
229
|
+
}).catch(function (exp) {
|
|
230
|
+
alert(exp.message);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
</script>
|
|
157
235
|
</body>
|
|
158
236
|
</html>
|
|
159
|
-
|
|
237
|
+
```
|
|
160
238
|
|
|
161
239
|
## Documentation
|
|
162
240
|
|
|
@@ -197,35 +275,35 @@ https://www.dynamsoft.com/Products/WebTWAIN_License.aspx
|
|
|
197
275
|
|
|
198
276
|
>`Dynamic Web TWAIN Service (DynamicWebTWAINService.exe, 64bit)`
|
|
199
277
|
>
|
|
200
|
-
>**v19.
|
|
278
|
+
>**v19.2** (build version 1, 9, 2, 0826)
|
|
201
279
|
>
|
|
202
|
-
>`Dynamic Web TWAIN Service Manager (
|
|
280
|
+
>`Dynamic Web TWAIN Service Manager (DWASManager_19200826.dll, 64bit)`
|
|
203
281
|
>
|
|
204
|
-
>**v19.
|
|
282
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
205
283
|
>
|
|
206
|
-
>`Device Manager (
|
|
284
|
+
>`Device Manager (DeviceManager_19200826.dll, 64bit)`
|
|
207
285
|
>
|
|
208
|
-
>**v19.
|
|
286
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
209
287
|
>
|
|
210
|
-
>`Dynamic Web TWAIN (dwt_19.
|
|
288
|
+
>`Dynamic Web TWAIN (dwt_19.2.0.0826.dll, 64bit)`
|
|
211
289
|
>
|
|
212
|
-
>**v19.
|
|
290
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
213
291
|
>
|
|
214
292
|
>`Dynamsoft Image encryption and decryption & PDF Rasterizer (DMCodecx64.dll, 64bit)`
|
|
215
293
|
>
|
|
216
|
-
>**v19.
|
|
294
|
+
>**v19.2** (build version 12, 0, 1, 0826)
|
|
217
295
|
>
|
|
218
296
|
>`Dynamsoft Barcode Reader (dbrx64_9.6.2.0318.dll, 64bit)`
|
|
219
297
|
>
|
|
220
298
|
>**v9.6.1** (build version 9, 6, 2, 0318)
|
|
221
299
|
>
|
|
222
|
-
>`Dynamsoft Webcam Addon (
|
|
300
|
+
>`Dynamsoft Webcam Addon (DynamicWebcamx64_19.2.0.0826.dll, 64bit)`
|
|
223
301
|
>
|
|
224
|
-
>**v19.
|
|
302
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
225
303
|
>
|
|
226
304
|
>`Dynamsoft Upload Module (UploadModule_1.9.0.0318.dll, 64bit)`
|
|
227
305
|
>
|
|
228
|
-
>**v19.
|
|
306
|
+
>**v19.2** (build version 1, 9, 0, 0318)
|
|
229
307
|
|
|
230
308
|
## Changelog
|
|
231
309
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|