dwt 17.1.12 → 17.2.2
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 +61 -37
- package/dist/addon/dbrjs/dbr-8.6.1.full.wasm +0 -0
- package/dist/addon/dbrjs/dbr-8.6.1.full.wasm.js +134 -0
- package/dist/addon/dbrjs/dbr-8.6.1.worker.js +113 -0
- package/dist/addon/dbrjs/dbr.js +11 -11
- package/dist/dist/DynamsoftServiceSetup-arm64.deb +0 -0
- package/dist/dist/DynamsoftServiceSetup-mips64el.deb +0 -0
- package/dist/dist/DynamsoftServiceSetup.deb +0 -0
- package/dist/dist/DynamsoftServiceSetup.msi +0 -0
- package/dist/dist/DynamsoftServiceSetup.pkg +0 -0
- package/dist/dist/DynamsoftServiceSetup.rpm +0 -0
- package/dist/dynamsoft.webtwain.min.js +701 -650
- package/dist/dynamsoft.webtwain.min.mjs +704 -652
- package/dist/src/dynamsoft.crypto-1.7.2.wasm +0 -0
- package/dist/src/dynamsoft.imageProc-1.7.2.wasm +0 -0
- package/dist/src/dynamsoft.imageProc-sn-1.7.2.wasm +0 -0
- package/dist/src/dynamsoft.imagecore-1.7.2.wasm +0 -0
- package/dist/src/dynamsoft.imageio-1.7.2.wasm +0 -0
- package/dist/src/dynamsoft.imageio_wasm-1.7.2.js +115 -0
- package/dist/src/dynamsoft.lts.js +34 -11
- package/dist/src/dynamsoft.pdfReader-1.7.2.wasm +0 -0
- package/dist/src/dynamsoft.pdfReader_wasm-1.7.2.js +90 -0
- package/dist/src/dynamsoft.pdfWriter-1.7.2.wasm +0 -0
- package/dist/src/dynamsoft.viewer.css +3 -2
- package/dist/src/dynamsoft.viewer.js +2 -2
- package/dist/src/dynamsoft.webtwain.css +1326 -1109
- package/dist/src/{dynamsoft.crypto-1.7.1.wasm → fastcomp/dynamsoft.crypto-1.7.2.wasm} +0 -0
- package/dist/src/fastcomp/dynamsoft.imageProc-1.7.2.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.imagecore-1.7.2.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.imageio-1.7.2.wasm +0 -0
- package/dist/src/fastcomp/dynamsoft.imageio_wasm-1.7.2.js +115 -0
- package/dist/src/fastcomp/dynamsoft.pdfWriter-1.7.2.wasm +0 -0
- package/dist/types/Addon.Camera.d.ts +108 -0
- package/dist/types/Dynamsoft.Enum.d.ts +2 -1
- package/dist/types/Dynamsoft.d.ts +17 -1
- package/dist/types/WebTwain.Buffer.d.ts +29 -1
- package/dist/types/WebTwain.Edit.d.ts +18 -0
- package/dist/types/WebTwain.Viewer.d.ts +48 -3
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/samples/1.AcquireImage.html +1 -1
- package/samples/10.ScanOrCapture.html +16 -3
- package/samples/11.mobilebrowsercapture.html +2 -1
- package/samples/2.CustomScan.html +1 -1
- package/samples/3.LoadAndSaveImages.html +1 -1
- package/samples/4.PDFRasterizer.html +1 -1
- package/samples/5.Edit.html +1 -1
- package/samples/6.Navigation.html +1 -1
- package/samples/7.Thumbnail.html +1 -1
- package/samples/8.OCRADocument.html +1 -1
- package/samples/9.ReadBarcode.html +1 -1
- package/dist/addon/dbrjs/dbr-8.2.5.full.wasm +0 -0
- package/dist/addon/dbrjs/dbr-8.2.5.full.wasm.js +0 -243
- package/dist/addon/dbrjs/dbr-8.2.5.worker.js +0 -112
- package/dist/src/dynamsoft.imageProc-1.7.1.wasm +0 -0
- package/dist/src/dynamsoft.imagecore-1.7.1.wasm +0 -0
- package/dist/src/dynamsoft.imageio-1.7.1.wasm +0 -0
- package/dist/src/dynamsoft.imageio_wasm-1.7.1.js +0 -106
- package/dist/src/dynamsoft.pdfReader-1.7.1.wasm +0 -0
- package/dist/src/dynamsoft.pdfWriter-1.7.1.wasm +0 -0
- package/dist/types/README.md +0 -16
|
Binary file
|
|
@@ -77,6 +77,11 @@ export interface Camera {
|
|
|
77
77
|
mode?: string,
|
|
78
78
|
fill?: boolean
|
|
79
79
|
): Promise<Resolution>;
|
|
80
|
+
/**
|
|
81
|
+
* Start streaming video from the current camera in the viewer.
|
|
82
|
+
* @param scanConfiguration The scanConfiguration settings. If not set, the default setting is used.
|
|
83
|
+
*/
|
|
84
|
+
scanDocument(scanConfiguration?: ScanConfiguration): Promise<Resolution>;
|
|
80
85
|
/**
|
|
81
86
|
* Close the camera and hide the video streaming UI.
|
|
82
87
|
*/
|
|
@@ -123,3 +128,106 @@ export interface ViewerEvent {
|
|
|
123
128
|
*/
|
|
124
129
|
pageY: number;
|
|
125
130
|
}
|
|
131
|
+
export interface ScanConfiguration {
|
|
132
|
+
element?: HTMLDivElement; //Bind the elment or elment id.
|
|
133
|
+
//After binding, display the video in the spcified element, otherwise, display the video in full screen.
|
|
134
|
+
|
|
135
|
+
scannerViewer?: {
|
|
136
|
+
deviceId?: string; //camera id
|
|
137
|
+
maxDocuments?:number; //The maximum documents can be captured/loaded in to the buffer.
|
|
138
|
+
enableBorderDetection?: boolean; //Whether to enable border detection. The default value is true.
|
|
139
|
+
fullScreen?: boolean; //Whether to display the video in full screen. The default value is false.
|
|
140
|
+
polygonStyle?:{ //The sytle of the auto detect border.
|
|
141
|
+
stroke?: string; //default: "#fe8e14". Only supports #16 hexadecimal.
|
|
142
|
+
strokeWidth?: string; //default: "2px"
|
|
143
|
+
dash?: string; //The allowed value are "solid" and "dashed", the default value is "solid".
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
resolution?: {
|
|
147
|
+
visibility?: boolean; //Whether to display the resolution icon in the upper left corner. The default value is true.
|
|
148
|
+
valueList?: any;
|
|
149
|
+
defaultValue?: Resolution; //Set the default value according to the value set in the valueList.
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
autoScan?: { //Automatically capture when a clear document is detected. Only applicable to video scanning.
|
|
153
|
+
visibility?: boolean; //Whether to display the automatic scan icon. The default value is true.
|
|
154
|
+
enableAutoScan?: boolean; //Whether to enable automatic scan. The default value is false.
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
autoDetect?: { //Only applicable to video scanning.
|
|
158
|
+
visibility?: boolean; //Whether to display the automatic border detection icon. The default value is true.
|
|
159
|
+
enableAutoDetect?: boolean; //Whether to enable automatic border detection. The default value is false.
|
|
160
|
+
acceptedPolygonConfidence?:number; //The default value is 80. The higher the setting, the more accurate the automatic border detection.
|
|
161
|
+
fpsLimit?: number; //The maximum number of frames detected per second. The default value is 3.
|
|
162
|
+
acceptedBlurryScore?:number; //The default value is 0.
|
|
163
|
+
autoCaptureDelay?: number; //The default value is 1000ms.
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
continuousScan?:{ //Only applicable to video scanning.
|
|
168
|
+
visibility?: boolean; //Whether to display the continuous scan icon. The default value is true.
|
|
169
|
+
enableContinuousScan?: boolean; //Whether to enable continuous scan. The default value is true.
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
switchCamera?: { //The default camera is the rear camera.
|
|
173
|
+
visibility?: boolean; //Whether to display the switch camera icon. The default value is true.
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
loadLocalFile?: {
|
|
177
|
+
visibility?: boolean; //Whether to display the load local file icon. The default value is true.
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
funcConfirmExitContinuousScan?: (bExistImage: boolean) => void;
|
|
181
|
+
//funcConfirmExitContinuousScan is the callback funtion
|
|
182
|
+
//Return true:Exit continuous scan mode without saving the captured image data. Return false: Stay on the original viewer
|
|
183
|
+
|
|
184
|
+
funcConfirmExit?: (bExistImage: boolean) => void;
|
|
185
|
+
//funcConfirmExit is the callback funtion,
|
|
186
|
+
//Return true:End this capture without saving the image data. Return false: Stay on the original viewer
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
filterViewer?: {
|
|
190
|
+
visibility?: boolean; //Whether to display filter viewer. The default value is true.
|
|
191
|
+
|
|
192
|
+
insert?: { //Insert an image
|
|
193
|
+
visibility?: boolean; //Whether to display the insert icon. The default value is true.
|
|
194
|
+
position?: string; //Set whether to insert the image "before" or "after" the current image. The default value is "before".
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
remove?: { //Remove an image
|
|
198
|
+
visibility?: boolean; //Whether to display the remove icon. The default value is true.
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
rotateLeft?: {
|
|
202
|
+
visibility?: boolean; //Whether to display the rotate left icon. The default value is true.
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
filter?: {
|
|
206
|
+
visibility?: boolean; //Whether to display the filter icon. The default value is true.
|
|
207
|
+
valueList?:any;
|
|
208
|
+
defaultValue?: string; //Filter selected by default. By default, the original filter is selected.
|
|
209
|
+
};
|
|
210
|
+
exitDocumentScanAfterSave: boolean; //The default value is false.
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
cropViewer?: {
|
|
214
|
+
visibility?: boolean; //Whether to display the crop viewer. The default value is true.
|
|
215
|
+
|
|
216
|
+
polygonStyle?:{ //The polygon style in the crop viewer.
|
|
217
|
+
stroke?: string; //default : "#fe8e14". Only supports #16 hexadecimal.
|
|
218
|
+
strokeWidth?: string; //default: "2px"
|
|
219
|
+
dash?: string; //The allowed value are "solid" and "dashed", the default value is "solid".
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
rotateLeft?:{
|
|
223
|
+
visibility?: boolean; //Whether to display the rotate left icon. The default value is true.
|
|
224
|
+
};
|
|
225
|
+
rotateRight?:{
|
|
226
|
+
visibility?: boolean; //Whether to display the rotate right icon. The default value is true.
|
|
227
|
+
};
|
|
228
|
+
autoDetectBorder?:{
|
|
229
|
+
visibility?: boolean; //Whether to display the automatic border detection icon. The default value is true.
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
@@ -294,6 +294,22 @@ export interface DWTPro {
|
|
|
294
294
|
* @param WebTwainId The WebTwainId.
|
|
295
295
|
*/
|
|
296
296
|
GetWebTwainEx(WebTwainId?: string): WebTwain;
|
|
297
|
+
/**
|
|
298
|
+
* Download and update the certificate on the local system.
|
|
299
|
+
* @param url The URL to download the certificate (typically a ZIP file).
|
|
300
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
301
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
302
|
+
* @argument errorCode The error code.
|
|
303
|
+
* @argument errorString The error string.
|
|
304
|
+
*/
|
|
305
|
+
UpdateCert(
|
|
306
|
+
url: string,
|
|
307
|
+
successCallback: () => void,
|
|
308
|
+
failureCallback: (
|
|
309
|
+
errorCode: number,
|
|
310
|
+
errorString: string
|
|
311
|
+
) => void
|
|
312
|
+
): void;
|
|
297
313
|
/**
|
|
298
314
|
* Whether or not an md5 header `dwt-md5` should be included in HTTP upload requests.
|
|
299
315
|
*/
|
|
@@ -481,7 +497,7 @@ export interface ManagerEnv {
|
|
|
481
497
|
* Interface for a WebTwain profile.
|
|
482
498
|
*/
|
|
483
499
|
export interface Container {
|
|
484
|
-
WebTwainId
|
|
500
|
+
WebTwainId?: string;
|
|
485
501
|
ContainerId?: string;
|
|
486
502
|
Width?: string | number;
|
|
487
503
|
Height?: string | number;
|
|
@@ -263,7 +263,35 @@ export interface WebTwainBuffer extends WebTwainIO {
|
|
|
263
263
|
*/
|
|
264
264
|
RemoveTag(tagName: string, indices?: number[]):boolean;
|
|
265
265
|
/**
|
|
266
|
-
* Get the
|
|
266
|
+
* Get the status of the tags.
|
|
267
267
|
*/
|
|
268
268
|
GetTagList(): any;
|
|
269
|
+
/**
|
|
270
|
+
* Get the status of the tags for a specific image.
|
|
271
|
+
* @param index Specify one image.
|
|
272
|
+
*/
|
|
273
|
+
GetTagListByIndex(index:number): any;
|
|
274
|
+
/**
|
|
275
|
+
* Get the current file name.
|
|
276
|
+
*/
|
|
277
|
+
GetCurrentFileName(): string;
|
|
278
|
+
/**
|
|
279
|
+
* Create the file.
|
|
280
|
+
* @param fileName Specify the file name.
|
|
281
|
+
*/
|
|
282
|
+
CreateFile(fileName: string):boolean;
|
|
283
|
+
/**
|
|
284
|
+
* open the file.
|
|
285
|
+
* @param fileName Specify the file name.
|
|
286
|
+
*/
|
|
287
|
+
OpenFile(fileName: string):boolean;
|
|
288
|
+
/**
|
|
289
|
+
* remove the file.
|
|
290
|
+
* @param fileName Specify the file name.
|
|
291
|
+
*/
|
|
292
|
+
RemoveFile():boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Get the info of the all files.
|
|
295
|
+
*/
|
|
296
|
+
GetFileInfoList(): any;
|
|
269
297
|
}
|
|
@@ -13,6 +13,24 @@ export interface WebTwainEdit extends WebTwainBuffer {
|
|
|
13
13
|
width?: number,
|
|
14
14
|
height?: number
|
|
15
15
|
): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Change the brightness of the specified image.
|
|
18
|
+
* @param index Specify the image.
|
|
19
|
+
* @param value Specify the value of brightness.
|
|
20
|
+
*/
|
|
21
|
+
ChangeBrightnessAsync(
|
|
22
|
+
index: number,
|
|
23
|
+
value: number
|
|
24
|
+
): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Change the contrast of the specified image.
|
|
27
|
+
* @param index Specify the image.
|
|
28
|
+
* @param value Specify the value of contrast.
|
|
29
|
+
*/
|
|
30
|
+
ChangeContrastAsnyc(
|
|
31
|
+
index: number,
|
|
32
|
+
value: number
|
|
33
|
+
): Promise<boolean>;
|
|
16
34
|
/**
|
|
17
35
|
* Change the bit depth of the specified image.
|
|
18
36
|
* @param index Specify the image.
|
|
@@ -182,7 +182,13 @@ export interface DynamsoftViewer {
|
|
|
182
182
|
* [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
|
|
183
183
|
*/
|
|
184
184
|
showPageNumber: boolean;
|
|
185
|
-
|
|
185
|
+
/**
|
|
186
|
+
* [Scope] Main viewer
|
|
187
|
+
* [Description] Whether to show the checkbox for multiple selected. The default value is false.
|
|
188
|
+
* [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
|
|
189
|
+
*/
|
|
190
|
+
showCheckbox: boolean;
|
|
191
|
+
/**
|
|
186
192
|
* [Scope] Main viewer
|
|
187
193
|
* [Description] When set to true, will make sure the first image in the viewer is always selected when scrolling through multiple images.
|
|
188
194
|
*/
|
|
@@ -289,13 +295,19 @@ export interface DynamsoftViewer {
|
|
|
289
295
|
setViewMode(
|
|
290
296
|
columns: number,
|
|
291
297
|
rows: number
|
|
292
|
-
): boolean;
|
|
298
|
+
): boolean;
|
|
299
|
+
/**
|
|
300
|
+
* [Scope] Global
|
|
301
|
+
* [Description] Create a document webviewer with specified settings.
|
|
302
|
+
* @param templateName The document webviewer settings. If not set, the default setting is used.
|
|
303
|
+
*/
|
|
304
|
+
createTemplate(templateName?: string): DocumentViewerTemplate;
|
|
293
305
|
/**
|
|
294
306
|
* [Scope] Global
|
|
295
307
|
* [Description] Create a Dynamsoft Viewer instance and bind it to the WebTwain instance.
|
|
296
308
|
* @param element Specify an HTML element to create the viewer.
|
|
297
309
|
*/
|
|
298
|
-
bind(element: HTMLDivElement): boolean;
|
|
310
|
+
bind(element: HTMLDivElement, documentViewerTemplate?: DocumentViewerTemplate): boolean;
|
|
299
311
|
/**
|
|
300
312
|
* [Scope] Main viewer
|
|
301
313
|
* [Description] Show the viewer (Main viewer, ImageEditor, ThumbnailViewer, CustomElement).
|
|
@@ -471,6 +483,12 @@ export interface ThumbnailViewerSettings {
|
|
|
471
483
|
* [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
|
|
472
484
|
*/
|
|
473
485
|
showPageNumber?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* [Scope] Thumbnail viewer
|
|
488
|
+
* [Description] Whether to show the checkbox for multiple selected. The default value is false.
|
|
489
|
+
* [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
|
|
490
|
+
*/
|
|
491
|
+
showCheckbox?: boolean;
|
|
474
492
|
/**
|
|
475
493
|
* [Scope] Thumbnail viewer
|
|
476
494
|
* [Description] When set to true, will make sure the first image in the viewer is always selected when scrolling through multiple images.
|
|
@@ -542,6 +560,8 @@ export interface CustomElement {
|
|
|
542
560
|
* [Description] Delete the element.
|
|
543
561
|
*/
|
|
544
562
|
dispose(): void;
|
|
563
|
+
|
|
564
|
+
element?: any;
|
|
545
565
|
}
|
|
546
566
|
export interface ImageEditor {
|
|
547
567
|
/**
|
|
@@ -658,6 +678,12 @@ export interface ThumbnailViewer {
|
|
|
658
678
|
* [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
|
|
659
679
|
*/
|
|
660
680
|
showPageNumber: boolean;
|
|
681
|
+
/**
|
|
682
|
+
* [Scope] Thumbnail viewer
|
|
683
|
+
* [Description] Whether to show the checkbox for multiple selected. The default value is false.
|
|
684
|
+
* [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
|
|
685
|
+
*/
|
|
686
|
+
showCheckbox: boolean;
|
|
661
687
|
/**
|
|
662
688
|
* [Scope] Thumbnail viewer
|
|
663
689
|
* [Description] When set to true, will make sure the first image in the viewer is always selected when scrolling through multiple images.
|
|
@@ -762,3 +788,22 @@ export interface Area {
|
|
|
762
788
|
right: number;
|
|
763
789
|
bottom: number;
|
|
764
790
|
}
|
|
791
|
+
export interface DocumentViewerTemplate {
|
|
792
|
+
/**
|
|
793
|
+
* Save button click event
|
|
794
|
+
*/
|
|
795
|
+
onSaveFunc?: () => void;
|
|
796
|
+
/**
|
|
797
|
+
* Upload button click event
|
|
798
|
+
*/
|
|
799
|
+
onUploadFunc?: () => void;
|
|
800
|
+
/**
|
|
801
|
+
* Remove button click event
|
|
802
|
+
*/
|
|
803
|
+
onRemoveSelectedFunc?: () => void;
|
|
804
|
+
onExitFunc?: () => void;
|
|
805
|
+
/**
|
|
806
|
+
* Get CustomElement. Can display save & upload viewer in CustomElement.
|
|
807
|
+
*/
|
|
808
|
+
getCustomElement(): CustomElement;
|
|
809
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* Product: Dynamsoft Web Twain
|
|
13
13
|
* Web Site: http://www.dynamsoft.com
|
|
14
14
|
*
|
|
15
|
-
* Copyright
|
|
15
|
+
* Copyright 2022, Dynamsoft Corporation
|
|
16
16
|
* Author: Dynamsoft Support Team
|
|
17
|
-
* Version:
|
|
17
|
+
* Version: 17.2
|
|
18
18
|
*/
|
|
19
19
|
import Dynamsoft from "./Dynamsoft";
|
|
20
20
|
export default Dynamsoft;
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<script type="text/javascript">
|
|
20
20
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
21
|
-
|
|
21
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
22
22
|
Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady);
|
|
23
23
|
window.onload = function () {
|
|
24
24
|
if (Dynamsoft.Lib.env.bMobile) {
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
<body style="padding: 30px;">
|
|
10
10
|
<div id="notMobile">
|
|
11
11
|
<h1>Acquire Images</h1>
|
|
12
|
+
<div id="divNoteDeploy" style="margin: 10px 0 10px;" >Make sure you deploy the sample to an webserver that
|
|
13
|
+
<ul>
|
|
14
|
+
<li style="margin: 5px 0 5px 20px; font-size: 12px;">Runs HTTPS</li>
|
|
15
|
+
<li style="margin-left: 20px;font-size: 12px;">Serves the *.wasm file with Content-Type: application/wasm.</li>
|
|
16
|
+
</ul>
|
|
17
|
+
</div>
|
|
12
18
|
<label style="font-size: x-large;" id="H5CameraLabel"><input type="checkbox" id="H5Camera" />Use H5
|
|
13
19
|
Camera</label>
|
|
14
20
|
<select style="font-size: x-large;" id="source"></select><br />
|
|
@@ -20,7 +26,8 @@
|
|
|
20
26
|
</div>
|
|
21
27
|
<script type="text/javascript">
|
|
22
28
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
23
|
-
|
|
29
|
+
Dynamsoft.DWT.UseCameraAddonWasm = true;
|
|
30
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
24
31
|
Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady);
|
|
25
32
|
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 600, Height: 800 }];
|
|
26
33
|
var bWASMCamera = true, bWASM = false;
|
|
@@ -176,8 +183,14 @@
|
|
|
176
183
|
SetIfWebcamPlayVideo(false);
|
|
177
184
|
}, 50);
|
|
178
185
|
};
|
|
179
|
-
if (bWASMCamera)
|
|
180
|
-
|
|
186
|
+
if (bWASMCamera){
|
|
187
|
+
var p = document.location.protocol;
|
|
188
|
+
if (p == 'https:' || p == 'http:')
|
|
189
|
+
DWObject.Addon.Camera.capture().then(function (blob) { DWObject.Viewer.render(); funCaptureImage(); });
|
|
190
|
+
else {
|
|
191
|
+
alert("HTTPS is required for accessing cameras.");
|
|
192
|
+
}
|
|
193
|
+
}
|
|
181
194
|
else
|
|
182
195
|
DWObject.Addon.Webcam.CaptureImage(funCaptureImage, funCaptureImage);
|
|
183
196
|
}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<div id="dwtcontrolContainer"></div>
|
|
39
39
|
<script type="text/javascript">
|
|
40
40
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
41
|
-
Dynamsoft.DWT.ProductKey = '
|
|
41
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
42
42
|
Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady); // Register OnWebTwainReady event. This event fires as soon as Dynamic Web TWAIN is initialized and ready to be used
|
|
43
43
|
window.onload = function () {
|
|
44
44
|
if (Dynamsoft.Lib.env.bMobile) {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<script type="text/javascript">
|
|
27
27
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
28
|
-
Dynamsoft.DWT.ProductKey = '
|
|
28
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
29
29
|
window.onload = function () {
|
|
30
30
|
Dynamsoft.DWT.Containers = [{ContainerId:'dwtcontrolContainer', Width:600, Height:800}];
|
|
31
31
|
Dynamsoft.DWT.Load();
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<div id="dwtcontrolContainer"></div>
|
|
16
16
|
<script type="text/javascript">
|
|
17
17
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
18
|
-
Dynamsoft.DWT.ProductKey = '
|
|
18
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
19
19
|
Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady);
|
|
20
20
|
window.onload = function () {
|
|
21
21
|
if (Dynamsoft.Lib.env.bMobile) {
|
package/samples/5.Edit.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<script type="text/javascript">
|
|
24
24
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
25
|
-
Dynamsoft.DWT.ProductKey = '
|
|
25
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
26
26
|
window.onload = function () {
|
|
27
27
|
Dynamsoft.DWT.Containers = [{ContainerId:'dwtcontrolContainer', Width:700, Height:800}];
|
|
28
28
|
Dynamsoft.DWT.Load();
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<script type="text/javascript">
|
|
42
42
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
43
|
-
Dynamsoft.DWT.ProductKey = '
|
|
43
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
44
44
|
window.onload = function () {
|
|
45
45
|
Dynamsoft.DWT.Containers = [{ContainerId:'dwtcontrolContainer', Width:700, Height:600}];
|
|
46
46
|
Dynamsoft.DWT.Load();
|
package/samples/7.Thumbnail.html
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<script type="text/javascript">
|
|
20
20
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
21
|
-
Dynamsoft.DWT.ProductKey = '
|
|
21
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
22
22
|
window.onload = function () {
|
|
23
23
|
if (Dynamsoft && (!Dynamsoft.Lib.product.bChromeEdition)) {
|
|
24
24
|
var ObjString = [];
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<script type="text/javascript">
|
|
31
31
|
Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
|
|
32
32
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
33
|
-
Dynamsoft.DWT.ProductKey = '
|
|
33
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
34
34
|
Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady);
|
|
35
35
|
Dynamsoft.Ready(function () {
|
|
36
36
|
onload();
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
<script type="text/javascript">
|
|
24
24
|
Dynamsoft.DWT.ResourcesPath = "../dist";
|
|
25
|
-
Dynamsoft.DWT.ProductKey = '
|
|
25
|
+
Dynamsoft.DWT.ProductKey = 't00901wAAAFGokK55GCTHFf8RWZ8bKjNRD1O+Gf0xA6MUdkmYI6zSueLnBjy55bNxl/YW1HkZykS/h0xYHBuFFwIDbexR567425Cx3hnuwAewN5DyXtRd/ATLnyy+';
|
|
26
26
|
Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady);
|
|
27
27
|
window.onload = function () {
|
|
28
28
|
if (Dynamsoft.Lib.env.bMobile) {
|
|
Binary file
|