dwt 19.1.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 -56
- 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 +35 -27
- package/dist/dynamsoft.webtwain.min.mjs +35 -27
- package/dist/src/dynamsoft.lts.js +10 -10
- package/dist/src/dynamsoft.webtwain.css +1 -1
- package/dist/src/dynamsoft.webtwain.viewer.css +3 -3
- package/dist/src/dynamsoft.webtwain.viewer.js +3 -3
- package/dist/types/RemoteScan.d.ts +3 -3
- package/dist/types/WebTwain.Acquire.d.ts +4 -0
- package/dist/types/WebTwain.Buffer.d.ts +4 -0
- package/dist/types/WebTwain.Edit.d.ts +1 -1
- package/dist/types/WebTwain.Viewer.d.ts +2 -2
- package/dist/types/index.d.ts +1 -6
- package/dwt-openapi.yaml +5 -0
- 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)
|
|
@@ -72,39 +72,74 @@ If you are making use of the `CDN` [jsDelivr](https://cdn.jsdelivr.net/npm/dwt),
|
|
|
72
72
|
## Quick Start
|
|
73
73
|
|
|
74
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
|
+
```
|
|
75
87
|
|
|
76
|
-
|
|
88
|
+
- UNPKG
|
|
89
|
+
```html
|
|
77
90
|
<!DOCTYPE html>
|
|
78
91
|
<html>
|
|
79
92
|
<head>
|
|
80
|
-
|
|
81
|
-
|
|
93
|
+
<title>Hello World</title>
|
|
94
|
+
<script src="https://unpkg.com/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
82
95
|
</head>
|
|
83
96
|
<body>
|
|
84
97
|
</body>
|
|
85
98
|
</html>
|
|
86
|
-
|
|
99
|
+
```
|
|
87
100
|
|
|
88
|
-
> 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.
|
|
89
102
|
|
|
90
103
|
### Step 2 Add a script tag and make initial settings:
|
|
91
104
|
|
|
92
|
-
|
|
105
|
+
- jsDelivr
|
|
106
|
+
```html
|
|
107
|
+
<!DOCTYPE html>
|
|
108
|
+
<html>
|
|
109
|
+
<head>
|
|
110
|
+
<title>Hello World</title>
|
|
111
|
+
<script src="https://cdn.jsdelivr.net/npm/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
112
|
+
</head>
|
|
113
|
+
<body>
|
|
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';
|
|
120
|
+
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
121
|
+
</script>
|
|
122
|
+
</body>
|
|
123
|
+
</html>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- UNPKG
|
|
127
|
+
```html
|
|
93
128
|
<!DOCTYPE html>
|
|
94
129
|
<html>
|
|
95
130
|
<head>
|
|
96
|
-
|
|
97
|
-
|
|
131
|
+
<title>Hello World</title>
|
|
132
|
+
<script src="https://unpkg.com/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
98
133
|
</head>
|
|
99
134
|
<body>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
135
|
+
<script type="text/javascript">
|
|
136
|
+
Dynamsoft.DWT.ResourcesPath = "https://unpkg.com/dwt@latest/dist";
|
|
137
|
+
Dynamsoft.DWT.ProductKey = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
|
|
103
138
|
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
104
|
-
|
|
139
|
+
</script>
|
|
105
140
|
</body>
|
|
106
141
|
</html>
|
|
107
|
-
|
|
142
|
+
```
|
|
108
143
|
|
|
109
144
|
> Note that `ResourcesPath` must be set in order to use the library.
|
|
110
145
|
|
|
@@ -114,47 +149,92 @@ If you are making use of the `CDN` [jsDelivr](https://cdn.jsdelivr.net/npm/dwt),
|
|
|
114
149
|
|
|
115
150
|
### Step 3 Write code to use the package to do a simple document scan
|
|
116
151
|
|
|
117
|
-
> 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
|
+
```
|
|
118
197
|
|
|
119
|
-
|
|
198
|
+
- UNPKG
|
|
199
|
+
```html
|
|
120
200
|
<!DOCTYPE html>
|
|
121
201
|
<html>
|
|
122
202
|
<head>
|
|
123
|
-
|
|
124
|
-
|
|
203
|
+
<title>Hello World</title>
|
|
204
|
+
<script src="https://unpkg.com/dwt@latest/dist/dynamsoft.webtwain.min.js"></script>
|
|
125
205
|
</head>
|
|
126
206
|
<body>
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
|
132
212
|
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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,
|
|
147
227
|
IfCloseSourceAfterAcquire: true
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
228
|
+
});
|
|
229
|
+
}).catch(function (exp) {
|
|
230
|
+
alert(exp.message);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
</script>
|
|
155
235
|
</body>
|
|
156
236
|
</html>
|
|
157
|
-
|
|
237
|
+
```
|
|
158
238
|
|
|
159
239
|
## Documentation
|
|
160
240
|
|
|
@@ -195,35 +275,35 @@ https://www.dynamsoft.com/Products/WebTWAIN_License.aspx
|
|
|
195
275
|
|
|
196
276
|
>`Dynamic Web TWAIN Service (DynamicWebTWAINService.exe, 64bit)`
|
|
197
277
|
>
|
|
198
|
-
>**v19.
|
|
278
|
+
>**v19.2** (build version 1, 9, 2, 0826)
|
|
199
279
|
>
|
|
200
|
-
>`Dynamic Web TWAIN Service Manager (
|
|
280
|
+
>`Dynamic Web TWAIN Service Manager (DWASManager_19200826.dll, 64bit)`
|
|
201
281
|
>
|
|
202
|
-
>**v19.
|
|
282
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
203
283
|
>
|
|
204
|
-
>`Device Manager (
|
|
284
|
+
>`Device Manager (DeviceManager_19200826.dll, 64bit)`
|
|
205
285
|
>
|
|
206
|
-
>**v19.
|
|
286
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
207
287
|
>
|
|
208
|
-
>`Dynamic Web TWAIN (dwt_19.
|
|
288
|
+
>`Dynamic Web TWAIN (dwt_19.2.0.0826.dll, 64bit)`
|
|
209
289
|
>
|
|
210
|
-
>**v19.
|
|
290
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
211
291
|
>
|
|
212
292
|
>`Dynamsoft Image encryption and decryption & PDF Rasterizer (DMCodecx64.dll, 64bit)`
|
|
213
293
|
>
|
|
214
|
-
>**v19.
|
|
294
|
+
>**v19.2** (build version 12, 0, 1, 0826)
|
|
215
295
|
>
|
|
216
296
|
>`Dynamsoft Barcode Reader (dbrx64_9.6.2.0318.dll, 64bit)`
|
|
217
297
|
>
|
|
218
298
|
>**v9.6.1** (build version 9, 6, 2, 0318)
|
|
219
299
|
>
|
|
220
|
-
>`Dynamsoft Webcam Addon (
|
|
300
|
+
>`Dynamsoft Webcam Addon (DynamicWebcamx64_19.2.0.0826.dll, 64bit)`
|
|
221
301
|
>
|
|
222
|
-
>**v19.
|
|
302
|
+
>**v19.2** (build version 19, 2, 0, 0826)
|
|
223
303
|
>
|
|
224
304
|
>`Dynamsoft Upload Module (UploadModule_1.9.0.0318.dll, 64bit)`
|
|
225
305
|
>
|
|
226
|
-
>**v19.
|
|
306
|
+
>**v19.2** (build version 1, 9, 0, 0318)
|
|
227
307
|
|
|
228
308
|
## Changelog
|
|
229
309
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|