dwt 17.3.1 → 18.1.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.
Files changed (53) hide show
  1. package/LICENSE.txt +2 -2
  2. package/README.md +25 -32
  3. package/dist/dist/DynamsoftServiceSetup-arm64.deb +0 -0
  4. package/dist/dist/DynamsoftServiceSetup.deb +0 -0
  5. package/dist/dist/DynamsoftServiceSetup.msi +0 -0
  6. package/dist/dist/DynamsoftServiceSetup.pkg +0 -0
  7. package/dist/dist/DynamsoftServiceSetup.rpm +0 -0
  8. package/dist/dynamsoft.webtwain.min.js +159 -97
  9. package/dist/dynamsoft.webtwain.min.mjs +254 -192
  10. package/dist/src/dynamsoft.lts.js +19 -41
  11. package/dist/src/dynamsoft.viewer.css +1 -1
  12. package/dist/src/dynamsoft.viewer.js +1 -1
  13. package/dist/src/dynamsoft.webtwain.css +43 -21
  14. package/dist/types/Dynamsoft.Enum.d.ts +14 -0
  15. package/dist/types/Dynamsoft.d.ts +85 -6
  16. package/dist/types/WebTwain.Acquire.d.ts +37 -3
  17. package/dist/types/WebTwain.Viewer.d.ts +21 -31
  18. package/dist/types/WebTwain.d.ts +0 -2
  19. package/package.json +2 -2
  20. package/dist/addon/dbrjs/dbr-8.8.7.full.wasm +0 -0
  21. package/dist/addon/dbrjs/dbr-8.8.7.full.wasm.js +0 -285
  22. package/dist/addon/dbrjs/dbr-8.8.7.worker.js +0 -113
  23. package/dist/addon/dbrjs/dbr.js +0 -22
  24. package/dist/addon/dynamsoft.webtwain.addon.camera.css +0 -7
  25. package/dist/dist/DynamsoftServiceSetup-mips64el.deb +0 -0
  26. package/dist/src/dynamsoft.crypto-1.7.3.wasm +0 -0
  27. package/dist/src/dynamsoft.imageProc-1.7.3.wasm +0 -0
  28. package/dist/src/dynamsoft.imageProc-sn-1.7.3.wasm +0 -0
  29. package/dist/src/dynamsoft.imagecore-1.7.3.wasm +0 -0
  30. package/dist/src/dynamsoft.imageio-1.7.3.wasm +0 -0
  31. package/dist/src/dynamsoft.imageio_wasm-1.7.3.js +0 -34
  32. package/dist/src/dynamsoft.pdfReader-1.7.3.wasm +0 -0
  33. package/dist/src/dynamsoft.pdfReader_wasm-1.7.3.js +0 -34
  34. package/dist/src/dynamsoft.pdfWriter-1.7.3.wasm +0 -0
  35. package/dist/src/fastcomp/dynamsoft.crypto-1.7.3.wasm +0 -0
  36. package/dist/src/fastcomp/dynamsoft.imageProc-1.7.3.wasm +0 -0
  37. package/dist/src/fastcomp/dynamsoft.imagecore-1.7.3.wasm +0 -0
  38. package/dist/src/fastcomp/dynamsoft.imageio-1.7.3.wasm +0 -0
  39. package/dist/src/fastcomp/dynamsoft.imageio_wasm-1.7.3.js +0 -34
  40. package/dist/src/fastcomp/dynamsoft.pdfWriter-1.7.3.wasm +0 -0
  41. package/dist/types/Addon.Camera.d.ts +0 -283
  42. package/samples/AcquireImage.html +0 -69
  43. package/samples/CustomScan.html +0 -98
  44. package/samples/Dynamic Web TWAIN Online Demo.html +0 -8
  45. package/samples/Dynamic Web TWAIN Sample Code Gallery.html +0 -8
  46. package/samples/Edit.html +0 -111
  47. package/samples/LoadAndSaveImages.html +0 -103
  48. package/samples/Navigation.html +0 -197
  49. package/samples/PDFRasterizer.html +0 -88
  50. package/samples/ReadBarcode.html +0 -231
  51. package/samples/ScanOrCapture.html +0 -202
  52. package/samples/Thumbnail.html +0 -88
  53. package/samples/mobilebrowsercapture.html +0 -13
@@ -37,7 +37,7 @@
37
37
 
38
38
  .dynamsoft-progressBar {
39
39
  -webkit-appearance: none;
40
- width: 280px;
40
+ width: 100%;
41
41
  margin-bottom: 20px;
42
42
  height: 14px;
43
43
  background-color: #e7e7e7;
@@ -218,8 +218,8 @@
218
218
  }
219
219
 
220
220
  .dynamsoft-dwt-dlg-header {
221
- padding: 15px 15px 5px 5px;
222
- height: 40px;
221
+ padding: 10px 10px 0 0;
222
+ height: 38px;
223
223
  position: relative;
224
224
  }
225
225
 
@@ -227,7 +227,7 @@
227
227
  text-align: center;
228
228
  height: 20px;
229
229
  font-size: 20px;
230
- font-family: "Helvetica", "Arial", "sans-serif";
230
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
231
231
  color: rgba(68, 68, 68, 1);
232
232
  line-height: 36px;
233
233
  }
@@ -240,7 +240,7 @@
240
240
  }
241
241
 
242
242
  .dynamsoft-dwt-dlg-tips {
243
- font-family: "Helvetica", "Arial", "sans-serif";
243
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
244
244
  text-align: center;
245
245
  color: #606060;
246
246
  font-size: 16px;
@@ -258,12 +258,12 @@
258
258
 
259
259
  .dynamsoft-dwt-dlg-tail {
260
260
  text-align: center;
261
- color: #AAAAAA;
262
- background-color: #F4F6F7;
263
- font-family: "Helvetica", "Arial", "sans-serif";
261
+ color: #606060;
262
+ background-color: #F5F5F5;
263
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
264
264
  font-size: 14px;
265
265
  line-height: 24px;
266
- padding: 15px;
266
+ padding: 20px;
267
267
  }
268
268
 
269
269
  .dynamsoft-dwt-dlg-red {
@@ -283,23 +283,36 @@
283
283
  background: #FE8E14;
284
284
  border-radius: 3px;
285
285
  font-size: 14px;
286
- font-family: "Helvetica", "Arial", "sans-serif";
286
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
287
287
  color: #FFFFFF;
288
288
  line-height: 36px;
289
289
  }
290
290
 
291
291
  .dynamsoft-dwt-dlg-button:hover {
292
- background-color: #FFAE37;
292
+ background-color: #FFAE37;
293
+ }
294
+
295
+ .dynamsoft-dwt-dlg-button-android {
296
+ margin: 10px 0 0 0;
297
+ cursor: pointer;
298
+ text-align: center;
299
+ width: 117px;
300
+ background: #323234;
301
+ font-size: 14px;
302
+ font-family: Oswald,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
303
+ color: #FFFFFF;
304
+ line-height: 36px;
293
305
  }
294
306
 
295
307
  .dynamsoft-dwt-dialogProgress {
296
- width: 330px
308
+ max-width: 330px;
309
+ width: 80%
297
310
  }
298
311
 
299
312
  /* dialog/mask body */
300
313
 
301
314
  .ds-dwt-ui-showdlg {
302
- font-family: "Helvetica", "Arial", "sans-serif";
315
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
303
316
  color: #444444;
304
317
  font-size: 14px;
305
318
  line-height: 24px;
@@ -311,7 +324,7 @@
311
324
  }
312
325
 
313
326
  .ds-dwt-ui-dlg-license-wrap, .ds-dwt-ui-dlg-wrap {
314
- font-family: "Helvetica", "Arial", "sans-serif";
327
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
315
328
  color: #606060;
316
329
  font-size: 14px;
317
330
  line-height: 23px;
@@ -324,9 +337,18 @@
324
337
  .ds-dwt-ui-dlg a:link,.ds-dwt-ui-dlg a:visited,
325
338
  .dynamsoft-dialog-license a:link,.dynamsoft-dialog-license a:visited
326
339
  {
327
- color: #50a8e1
340
+ color: #50A8E1
328
341
  }
329
342
 
343
+ .ds-dwt-ui-dlg-android
344
+ {
345
+ padding:0 20px 20px 20px
346
+ }
347
+
348
+ .ds-dwt-ui-dlg-android a:link,.ds-dwt-ui-dlg-android a:visited
349
+ {
350
+ color: #FE8E14
351
+ }
330
352
 
331
353
  .ds-dwt-ui-dlg .dynamsoft-dialog-close
332
354
  {
@@ -337,7 +359,7 @@
337
359
 
338
360
 
339
361
  .ds_license_header {
340
- color: #333333;
362
+ color: #323234;
341
363
  font-size: 20px;
342
364
  padding: 40px 15px 15px 15px;
343
365
  text-align: center;
@@ -357,8 +379,8 @@
357
379
  }
358
380
 
359
381
  .dynamsoft-dialog {
360
- font-family: "Helvetica", "Arial", "sans-serif";
361
- color: #444444;
382
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
383
+ color: #323234;
362
384
  font-size: 16px;
363
385
  line-height: 24px;
364
386
  background-color: #FFFFFF;
@@ -416,8 +438,8 @@
416
438
  }
417
439
 
418
440
  .dynamsoft-dwt-box-title {
419
- color: #333333;
420
- font-family: "Helvetica", "Arial", "sans-serif";
441
+ color: #323234;
442
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
421
443
  font-size: 16px;
422
444
  font-weight: bold;
423
445
  clear: both
@@ -445,7 +467,7 @@
445
467
  position: relative;
446
468
  height: 11px;
447
469
  font-size: 14px;
448
- font-family: "Helvetica", "Arial", "sans-serif";
470
+ font-family: OpenSans,"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
449
471
  color: rgba(119, 119, 119, 1);
450
472
  line-height: 36px;
451
473
  }
@@ -1862,4 +1862,18 @@ export namespace DynamsoftEnumsDWT {
1862
1862
  Single = 0,
1863
1863
  Multiple = 1
1864
1864
  }
1865
+ enum EnumDWT_ExtImageInfo {
1866
+ default = 0,
1867
+ standard = 1,
1868
+ supported = 2
1869
+ }
1870
+ enum EnumDWT_DeviceType{
1871
+ TWAINSCANNER = 0x10,
1872
+ WIATWAINSCANNER = 0x20,
1873
+ TWAINX64SCANNER = 0x40,
1874
+ ICASCANNER = 0x80,
1875
+ SANESCANNER = 0x100,
1876
+ ESCLSCANNER = 0x200,
1877
+ WIFIDIRECTSCANNER = 0x400
1878
+ }
1865
1879
  }
@@ -3,7 +3,7 @@ import { DynamsoftEnumsDWT} from "./Dynamsoft.Enum";
3
3
  import { WebTwain } from "./WebTwain";
4
4
  import { Settings } from "./Addon.OCRPro";
5
5
  import { FileUploader } from "./Dynamsoft.FileUploader";
6
-
6
+ import { DeviceConfiguration, ServiceInfo, Device, CapabilityDetails, Capabilities} from "./WebTwain.Acquire";
7
7
 
8
8
  export namespace DynamsoftStatic {
9
9
  let Lib: DynamsoftLib;
@@ -26,7 +26,8 @@ export interface DWTInitialConfig {
26
26
  WebTwainId: string;
27
27
  Host?: string;
28
28
  Port?: string;
29
- SSLPort?: string;
29
+ PortSSL?: string;
30
+ UseLocalService?: boolean;
30
31
  }
31
32
  export interface DynamsoftLib {
32
33
  /**
@@ -218,6 +219,7 @@ export interface DWTPro {
218
219
  * Whether to create a WebTwain instance automatically upon page load.
219
220
  */
220
221
  AutoLoad: boolean;
222
+ Host: string;
221
223
  /**
222
224
  * Close a dialog opened by the method ShowDialog.
223
225
  */
@@ -357,6 +359,7 @@ export interface DWTPro {
357
359
  handshakeCode?: string;
358
360
  sessionPassword?: string;
359
361
  organizationID?: string;
362
+ licenseException?: string;
360
363
  /**
361
364
  * The product name.
362
365
  */
@@ -400,10 +403,6 @@ export interface DWTPro {
400
403
  * Remove and destroy all WebTwain instances.
401
404
  */
402
405
  Unload(): void;
403
- /**
404
- * Whether to download the wasm for Camera Addon to use on initialization.
405
- */
406
- UseCameraAddonWasm: boolean;
407
406
  /**
408
407
  * Whether to use the library in Local-Service mode or WASM mode.
409
408
  */
@@ -434,6 +433,34 @@ export interface DWTPro {
434
433
  * inited, _srcUseLocalService
435
434
  */
436
435
  IfCheckDCP: boolean;
436
+
437
+ OnLicenseException: () => void;
438
+ /**
439
+ * Dynamsoft.DWT.DeviceFriendlyName
440
+ */
441
+ DeviceFriendlyName: string;
442
+ /**
443
+ * Bring up the Source Selection User Interface (UI) for the user to choose a data source.
444
+ * @param serverUrl The URL of the proxy server: https(http)://domain_name:port (default: 443).
445
+ * @param forceRefresh Default value: false.
446
+ */
447
+ FindDynamsoftServiceAsync(serverUrl: string, forceRefresh?: boolean): Promise<ServiceInfo[]>;
448
+ /**
449
+ * Based on serviceInfo, return the existing DWObject if already exists, otherwise, create a new one.
450
+ * @param serverUrl The proxy server url or the serviceInfo.
451
+ * @param deviceType The value to filter scanners. Default: TWAINSCANNER
452
+ * @param forceRefresh Default value: false.
453
+ */
454
+ FindDevicesAsync(serverUrl: string | ServiceInfo, deviceType?: DynamsoftEnumsDWT.EnumDWT_DeviceType | number, forceRefresh?: boolean): Promise<Device[]>;
455
+ /**
456
+ * Based on serviceInfo, return the existing object if already exists, otherwise, create a new one.
457
+ * @param serviceInfo The service information.
458
+ */
459
+ CreateRemoteScanObjectAsync(serviceInfo: ServiceInfo): Promise<RemoteScanObject>;
460
+ /**
461
+ * Dynamsoft.DWT.ConnectWithSocket
462
+ */
463
+ ConnectWithSocket: boolean;
437
464
  }
438
465
  export interface DisplayInfo {
439
466
  loaderBarSource?: string;
@@ -516,6 +543,58 @@ export interface DWTInstall {
516
543
  funcConfirmExitAfterSave?: (firedByDocumentEdit: boolean) => void;
517
544
  funcConfirmCropViewerExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
518
545
  funcConfirmMainViewerExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
546
+
547
+ OnLTSConnectionFailure?: (message?: string) => void;
548
+ OnLTSReturnedAnError?: (message?: string) => void;
549
+ OnLTSUUIDError?: (message?: string) => void;
550
+ OnLTSConnectionWarning?: () => void;
551
+ OnLTSPublicLicenseMessage?: (message?: string) => void;
552
+ }
553
+ export interface RemoteScanObject {
554
+ /**
555
+ * Return all available devices (scanners, eSCL scanners, etc.) for the device type (if specified)
556
+ * @param deviceType The device type
557
+ * @param refresh Default value: false
558
+ */
559
+ getDevices(deviceType?: DynamsoftEnumsDWT.EnumDWT_DeviceType | number, refresh?: boolean): Promise<Device[]>;
560
+ /**
561
+ * Select the device to use for scanning
562
+ * @param device the device
563
+ */
564
+ selectDevice(device: Device): Promise<boolean>;
565
+ /**
566
+ * Scan documents into another DWObject control. Supports eSCL scanners and all other scanners with limited capabilities.
567
+ * @param deviceConfiguration The device configuration
568
+ * @param sendTo The DWObject control to scan into
569
+ */
570
+ acquireImage(deviceConfiguration?: DeviceConfiguration, sendTo?: WebTwain): Promise<boolean>;
571
+ /**
572
+ * Close the data source (a TWAIN/ICA/SANE device which in most cases is a scanner) to free it to be used by other applications.
573
+ */
574
+ closeSource(): Promise<boolean>;
575
+ /**
576
+ * Bring up the Source Selection User Interface (UI) for the user to choose a data source.
577
+ * @param deviceType The device type.
578
+ */
579
+ selectSource(deviceType?: DynamsoftEnumsDWT.EnumDWT_DeviceType | number): Promise<number>;
580
+ /**
581
+ * Gets detailed information about all capabilities of the current data source.
582
+ * @argument capabilityDetails Detailed information about the specified capabilities.
583
+ */
584
+ getCapabilities():Promise<CapabilityDetails[]>;
585
+ /**
586
+ * Sets up one or multiple capabilities in one call.
587
+ * @param capabilities A object that describes how to set capabilities.
588
+ */
589
+ setCapabilities(capabilities: Capabilities): Promise<boolean>;
590
+ /**
591
+ * Load a data source to get it ready to acquire images.
592
+ */
593
+ openSource():Promise<boolean>;
594
+ /**
595
+ * Delete the Remote Scan Object.
596
+ */
597
+ dispose(): boolean;
519
598
  }
520
599
  declare const Dynamsoft: (DWTInstall & typeof DynamsoftStatic);
521
600
  //declare const Dynamsoft: (typeof DynamsoftStatic);
@@ -1,5 +1,6 @@
1
1
  import { DynamsoftEnumsDWT } from "./Dynamsoft.Enum";
2
2
  import { WebTwainEdit } from "./WebTwain.Edit";
3
+ import { WebTwain } from "./WebTwain";
3
4
 
4
5
  export interface WebTwainAcquire extends WebTwainEdit {
5
6
  /**
@@ -84,9 +85,10 @@ export interface WebTwainAcquire extends WebTwainEdit {
84
85
  ): boolean | void;
85
86
  /**
86
87
  * Bring up the Source Selection User Interface (UI) for the user to choose a data source.
88
+ * @param deviceType The device type. Added the parameter deviceType in Dynamic Web TWAIN 18
87
89
  */
88
- SelectSourceAsync(
89
- ): Promise<boolean>;
90
+ SelectSourceAsync(deviceType?: DynamsoftEnumsDWT.EnumDWT_DeviceType | number
91
+ ): Promise<number>;
90
92
  /**
91
93
  * Select a data source by its index.
92
94
  * @param index The index of the data source.
@@ -97,6 +99,22 @@ export interface WebTwainAcquire extends WebTwainEdit {
97
99
  * @param index The index of the data source.
98
100
  */
99
101
  SelectSourceByIndexAsync(index: number): Promise<boolean>;
102
+ /**
103
+ * Return all available devices (scanners, eSCL scanners, etc.) for the device type (if specified)
104
+ * @param deviceType The device type
105
+ * @param refresh Default value: false
106
+ */
107
+ GetDevicesAsync(deviceType?: DynamsoftEnumsDWT.EnumDWT_DeviceType | number, refresh?: boolean): Promise<Device[]>;
108
+ /**
109
+ * Select the device to use for scanning
110
+ * @param device the device
111
+ */
112
+ SelectDeviceAsync(device: Device): Promise< boolean>;
113
+ /**
114
+ * Scan documents into another DWObject control. eSCL is not supported.
115
+ * @param deviceConfiguration The device configuration
116
+ */
117
+ AcquireImageAsync(deviceConfiguration?: DeviceConfiguration): Promise< boolean>;
100
118
  /**
101
119
  * Sets a timer which stops the data source opening process once it expires.
102
120
  * @param duration Define the duration of the timer (in milliseconds).
@@ -635,6 +653,10 @@ export interface DeviceConfiguration {
635
653
  * Whether to close the built-in User Interface after aquisition. Only valid when {IfShowUI} is true.
636
654
  */
637
655
  IfDisableSourceAfterAcquire?: boolean;
656
+ /**
657
+ * Whether to close source after aquisition.
658
+ */
659
+ IfCloseSourceAfterAcquire?:boolean;
638
660
  /**
639
661
  * Whether to retrieve information about the image after it's transferred.
640
662
  */
@@ -646,7 +668,7 @@ export interface DeviceConfiguration {
646
668
  /**
647
669
  * How much extended information is retrieved. Only valid when {IfGetExtImageInfo} is true.
648
670
  */
649
- extendedImageInfoQueryLevel?: number;
671
+ extendedImageInfoQueryLevel?: DynamsoftEnumsDWT.EnumDWT_ExtImageInfo | number;
650
672
  /**
651
673
  * Whether to simulate the manufacturer's UI inside the client-side browser (only effective when IfShowUI is true).
652
674
  * (Added in 16.2)
@@ -1067,3 +1089,15 @@ export interface CapabilitySetup {
1067
1089
  */
1068
1090
  exception?: string;
1069
1091
  }
1092
+ export interface ServiceInfo {
1093
+ server: string; // same to serverUrl, user input
1094
+ attrs?: any;
1095
+ }
1096
+ export interface Device {
1097
+ name: string;
1098
+ displayName: string;
1099
+ deviceType: DynamsoftEnumsDWT.EnumDWT_DeviceType;
1100
+ serviceInfo?: ServiceInfo;
1101
+ deviceInfo?: any;
1102
+ acquireImage(deviceConfiguration: DeviceConfiguration | null, sendTo: WebTwain): Promise< boolean>;
1103
+ }
@@ -1,5 +1,4 @@
1
1
  import { WebTwainAcquire } from "./WebTwain.Acquire";
2
- import { DocumentConfiguration, Resolution } from "./Addon.Camera";
3
2
  import { DynamsoftEnumsDWT } from "./Dynamsoft.Enum";
4
3
 
5
4
  export interface WebTwainViewer extends WebTwainAcquire {
@@ -67,6 +66,10 @@ export interface WebTwainViewer extends WebTwainAcquire {
67
66
  */
68
67
  Zoom: number;
69
68
  Viewer: DynamsoftViewer;
69
+ /**
70
+ * Delete the web-twain Object.
71
+ */
72
+ dispose(): Promise<void>;
70
73
  }
71
74
  export interface DynamsoftViewer {
72
75
  /**
@@ -233,7 +236,7 @@ export interface DynamsoftViewer {
233
236
  * [Scope] Main viewer
234
237
  * [Description] Refresh the viewer, the effect is shown in "onPageRender" event
235
238
  */
236
- render(): void;
239
+ render(): boolean;
237
240
  /**
238
241
  * [Scope] Global
239
242
  * [Description] Create an image editor with specified settings.
@@ -255,14 +258,7 @@ export interface DynamsoftViewer {
255
258
  * @param location Whether to put the element in the main viewer. Allowed values are left, top, right, bottom.
256
259
  * @param ifFull Whether to display the element in full screen.
257
260
  */
258
- createCustomElement(element: HTMLDivElement, location?: string, ifFull?: boolean): CustomElement;
259
- /**
260
- * [Scope] Global
261
- * [Description] Create a document editor with specified settings.
262
- * [Usage Notes]If you create it multiple times, you'll receive 'A DocumentEditor already exists' error, and an existing DocumentEditor object will be returned.
263
- * @param documentConfiguration The DocumentEditor settings. If not set, the default setting is used.
264
- */
265
- createDocumentEditor(documentConfiguration?: DocumentConfiguration): DocumentEditor;
261
+ createCustomElement(element: HTMLDivElement | HTMLElement, location?: string, ifFull?: boolean): CustomElement;
266
262
  /**
267
263
  * [Scope] Global
268
264
  * [Description] Return the current UI settings (from DVS itself)
@@ -326,28 +322,22 @@ export interface DynamsoftViewer {
326
322
  columns: number,
327
323
  rows: number
328
324
  ): boolean;
329
- /**
330
- * [Scope] Global
331
- * [Description] Create a document webviewer with specified settings.
332
- * @param templateName The document webviewer settings. If not set, the default setting is used. The allowed value is "documentCapture".
333
- */
334
- createTemplate(templateName?: string, documentConfiguration?: DocumentConfiguration): DocumentViewerTemplate;
335
325
  /**
336
326
  * [Scope] Global
337
327
  * [Description] Create a Dynamsoft Viewer instance and bind it to the WebTwain instance.
338
328
  * @param element Specify an HTML element to create the viewer.
339
329
  */
340
- bind(element: HTMLDivElement, documentViewerTemplate?: DocumentViewerTemplate): boolean;
330
+ bind(element: HTMLDivElement | HTMLElement, documentViewerTemplate?: DocumentViewerTemplate): boolean;
341
331
  /**
342
332
  * [Scope] Main viewer
343
333
  * [Description] Show the viewer (Main viewer, ImageEditor, ThumbnailViewer, CustomElement).
344
334
  */
345
- show(): void;
335
+ show(): boolean;
346
336
  /**
347
337
  * [Scope] Main viewer
348
338
  * [Description] Hide the viewer(Main viewer, ImageEditor, ThumbnailViewer, CustomElement).
349
339
  */
350
- hide(): void;
340
+ hide(): boolean;
351
341
  /**
352
342
  * [Scope] Main viewer
353
343
  * [Description] Unbind the viewer.
@@ -374,7 +364,7 @@ export interface EditorSettings {
374
364
  * [Scope] ImageEditor viewer
375
365
  * [Description] Specify an HTML Element.
376
366
  */
377
- element?: HTMLDivElement;
367
+ element?: HTMLDivElement | HTMLElement;
378
368
  /**
379
369
  * [Scope] ImageEditor viewer
380
370
  * [Description] The width of the image editor viewer. The default value is "100%".
@@ -581,17 +571,17 @@ export interface CustomElement {
581
571
  * [Scope] Current Element
582
572
  * [Description] Show the element.
583
573
  */
584
- show(): void;
574
+ show(): boolean;
585
575
  /**
586
576
  * [Scope] Current Element
587
577
  * [Description] Hide the element.
588
578
  */
589
- hide(): void;
579
+ hide(): boolean;
590
580
  /**
591
581
  * [Scope] Current Element
592
582
  * [Description] Delete the element.
593
583
  */
594
- dispose(): void;
584
+ dispose(): boolean;
595
585
 
596
586
  element?: any;
597
587
  }
@@ -600,12 +590,12 @@ export interface ImageEditor {
600
590
  * [Scope] ImageEditor viewer
601
591
  * [Description] Show the ImageEditor viewer.
602
592
  */
603
- show(): void;
593
+ show(): boolean;
604
594
  /**
605
595
  * [Scope] ImageEditor viewer
606
596
  * [Description] Hide the ImageEditor viewer.
607
597
  */
608
- hide(): void;
598
+ hide(): boolean;
609
599
  /**
610
600
  * [Scope] ImageEditor viewer
611
601
  * [Description] Delete the ImageEditor viewer.
@@ -617,17 +607,17 @@ export interface ThumbnailViewer {
617
607
  * [Scope] Thumbnail viewer
618
608
  * [Description] Show the Thumbnail viewer.
619
609
  */
620
- show(): void;
610
+ show(): boolean;
621
611
  /**
622
612
  * [Scope] Thumbnail viewer
623
613
  * [Description] Hide the Thumbnail viewer.
624
614
  */
625
- hide(): void;
615
+ hide(): boolean;
626
616
  /**
627
617
  * [Scope] Thumbnail viewer
628
618
  * [Description] Delete the Thumbnail viewer.
629
619
  */
630
- dispose(): void;
620
+ dispose(): boolean;
631
621
  /**
632
622
  * [Scope] Thumbnail viewer
633
623
  * [Description] Set the view mode.
@@ -788,17 +778,17 @@ export interface DocumentEditor {
788
778
  * [Scope] DocumentEditor viewer
789
779
  * [Description] Show the DocumentEditor viewer.
790
780
  */
791
- show(): void;
781
+ show(): boolean;
792
782
  /**
793
783
  * [Scope] DocumentEditor viewer
794
784
  * [Description] Hide the DocumentEditor viewer.
795
785
  */
796
- hide(): void;
786
+ hide(): boolean;
797
787
  /**
798
788
  * [Scope] DocumentEditor viewer
799
789
  * [Description] Delete the DocumentEditor viewer.
800
790
  */
801
- dispose(): void;
791
+ dispose(): boolean;
802
792
  }
803
793
 
804
794
  export interface ViewMode {
@@ -5,7 +5,6 @@ import { OCR } from "./Addon.OCR";
5
5
  import { OCRPro } from "./Addon.OCRPro";
6
6
  import { PDF } from "./Addon.PDF";
7
7
  import { Webcam } from "./Addon.Webcam";
8
- import { Camera } from "./Addon.Camera";
9
8
 
10
9
  export interface WebTwain extends WebTwainViewer {
11
10
  /**
@@ -47,5 +46,4 @@ export interface Addon {
47
46
  OCRPro: OCRPro;
48
47
  PDF: PDF;
49
48
  Webcam: Webcam;
50
- Camera: Camera;
51
49
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dwt",
3
- "version": "17.3.1",
3
+ "version": "18.1.0",
4
4
  "author": {
5
5
  "name": "Dynamsoft",
6
6
  "url": "https://www.dynamsoft.com"
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "dependencies": {
10
- "dynamsoft-javascript-barcode": "8.8.7"
10
+ "dynamsoft-javascript-barcode": "9.2.13"
11
11
  },
12
12
  "description": "Dynamic Web TWAIN is a TWAIN/ICA/SANE-based scanning SDK software specifically designed for web applications running on Windows/macOS/Linux. With just a few lines of code, you can develop robust applications to scan documents from TWAIN/ICA/SANE-compatible scanners, edit the scanned images and save them to a local/server file system or document repository.",
13
13
  "devDependencies": {},