dwt 17.2.3 → 17.3.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 (65) hide show
  1. package/LICENSE.txt +24 -22
  2. package/README.md +28 -28
  3. package/dist/addon/dbrjs/dbr-8.8.7.full.wasm +0 -0
  4. package/dist/addon/dbrjs/dbr-8.8.7.full.wasm.js +285 -0
  5. package/dist/addon/dbrjs/dbr-8.8.7.worker.js +113 -0
  6. package/dist/addon/dbrjs/dbr.js +22 -11
  7. package/dist/addon/dynamsoft.webtwain.addon.camera.css +7 -0
  8. package/dist/dist/DynamsoftServiceSetup-arm64.deb +0 -0
  9. package/dist/dist/DynamsoftServiceSetup-mips64el.deb +0 -0
  10. package/dist/dist/DynamsoftServiceSetup.deb +0 -0
  11. package/dist/dist/DynamsoftServiceSetup.msi +0 -0
  12. package/dist/dist/DynamsoftServiceSetup.pkg +0 -0
  13. package/dist/dist/DynamsoftServiceSetup.rpm +0 -0
  14. package/dist/dynamsoft.webtwain.min.js +258 -369
  15. package/dist/dynamsoft.webtwain.min.mjs +266 -374
  16. package/dist/src/{dynamsoft.crypto-1.7.2.wasm → dynamsoft.crypto-1.7.3.wasm} +0 -0
  17. package/dist/src/{dynamsoft.imageProc-1.7.2.wasm → dynamsoft.imageProc-1.7.3.wasm} +0 -0
  18. package/dist/src/{dynamsoft.imageProc-sn-1.7.2.wasm → dynamsoft.imageProc-sn-1.7.3.wasm} +0 -0
  19. package/dist/src/{dynamsoft.imagecore-1.7.2.wasm → dynamsoft.imagecore-1.7.3.wasm} +0 -0
  20. package/dist/src/dynamsoft.imageio-1.7.3.wasm +0 -0
  21. package/dist/src/dynamsoft.imageio_wasm-1.7.3.js +34 -0
  22. package/dist/src/dynamsoft.lts.js +2 -2
  23. package/dist/src/{dynamsoft.pdfReader-1.7.2.wasm → dynamsoft.pdfReader-1.7.3.wasm} +0 -0
  24. package/dist/src/dynamsoft.pdfReader_wasm-1.7.3.js +34 -0
  25. package/dist/src/{dynamsoft.pdfWriter-1.7.2.wasm → dynamsoft.pdfWriter-1.7.3.wasm} +0 -0
  26. package/dist/src/dynamsoft.viewer.css +2 -3
  27. package/dist/src/dynamsoft.viewer.js +1 -2
  28. package/dist/src/dynamsoft.webtwain.css +1 -29
  29. package/dist/src/fastcomp/{dynamsoft.crypto-1.7.2.wasm → dynamsoft.crypto-1.7.3.wasm} +0 -0
  30. package/dist/src/fastcomp/{dynamsoft.imageProc-1.7.2.wasm → dynamsoft.imageProc-1.7.3.wasm} +0 -0
  31. package/dist/src/fastcomp/{dynamsoft.imagecore-1.7.2.wasm → dynamsoft.imagecore-1.7.3.wasm} +0 -0
  32. package/dist/src/fastcomp/dynamsoft.imageio-1.7.3.wasm +0 -0
  33. package/dist/src/fastcomp/dynamsoft.imageio_wasm-1.7.3.js +34 -0
  34. package/dist/src/fastcomp/{dynamsoft.pdfWriter-1.7.2.wasm → dynamsoft.pdfWriter-1.7.3.wasm} +0 -0
  35. package/dist/types/Addon.Camera.d.ts +147 -97
  36. package/dist/types/Addon.PDF.d.ts +20 -11
  37. package/dist/types/Dynamsoft.Enum.d.ts +12 -1
  38. package/dist/types/Dynamsoft.d.ts +14 -18
  39. package/dist/types/WebTwain.Acquire.d.ts +26 -16
  40. package/dist/types/WebTwain.Buffer.d.ts +63 -15
  41. package/dist/types/WebTwain.IO.d.ts +1 -1
  42. package/dist/types/WebTwain.Util.d.ts +1 -1
  43. package/dist/types/WebTwain.Viewer.d.ts +107 -9
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/types/tsconfig.json +0 -1
  46. package/package.json +2 -2
  47. package/samples/{1.AcquireImage.html → AcquireImage.html} +1 -1
  48. package/samples/{2.CustomScan.html → CustomScan.html} +1 -1
  49. package/samples/{5.Edit.html → Edit.html} +1 -1
  50. package/samples/{3.LoadAndSaveImages.html → LoadAndSaveImages.html} +1 -1
  51. package/samples/{6.Navigation.html → Navigation.html} +1 -1
  52. package/samples/{4.PDFRasterizer.html → PDFRasterizer.html} +1 -1
  53. package/samples/{9.ReadBarcode.html → ReadBarcode.html} +1 -1
  54. package/samples/{10.ScanOrCapture.html → ScanOrCapture.html} +1 -1
  55. package/samples/{7.Thumbnail.html → Thumbnail.html} +1 -1
  56. package/samples/{11.mobilebrowsercapture.html → mobilebrowsercapture.html} +3 -0
  57. package/dist/addon/dbrjs/dbr-8.6.1.full.wasm +0 -0
  58. package/dist/addon/dbrjs/dbr-8.6.1.full.wasm.js +0 -134
  59. package/dist/addon/dbrjs/dbr-8.6.1.worker.js +0 -113
  60. package/dist/src/dynamsoft.imageio-1.7.2.wasm +0 -0
  61. package/dist/src/dynamsoft.imageio_wasm-1.7.2.js +0 -115
  62. package/dist/src/dynamsoft.pdfReader_wasm-1.7.2.js +0 -90
  63. package/dist/src/fastcomp/dynamsoft.imageio-1.7.2.wasm +0 -0
  64. package/dist/src/fastcomp/dynamsoft.imageio_wasm-1.7.2.js +0 -115
  65. package/samples/8.OCRADocument.html +0 -160
@@ -1,3 +1,4 @@
1
+ import { DynamsoftEnumsDWT } from "./Dynamsoft.Enum";
1
2
  export interface Camera {
2
3
  /**
3
4
  * Hide the camera interface.
@@ -43,7 +44,8 @@ export interface Camera {
43
44
  * @param resolution Specify the initial resolution.
44
45
  */
45
46
  play(element?: HTMLElement,
46
- resolution?: Resolution
47
+ resolution?: Resolution,
48
+ fill?: boolean
47
49
  ): Promise<Resolution>;
48
50
  /**
49
51
  * Pause the video stream.
@@ -79,24 +81,24 @@ export interface Camera {
79
81
  ): Promise<Resolution>;
80
82
  /**
81
83
  * Start streaming video from the current camera in the viewer.
82
- * @param scanConfiguration The scanConfiguration settings. If not set, the default setting is used.
84
+ * @param documentConfiguration The documentConfiguration settings. If not set, the default setting is used.
83
85
  */
84
- scanDocument(scanConfiguration?: ScanConfiguration): Promise<Resolution>;
86
+ scanDocument(documentConfiguration?: DocumentConfiguration): Promise<Resolution>;
85
87
  /**
86
88
  * Close the camera and hide the video streaming UI.
87
89
  */
88
90
  closeVideo(): void;
89
91
  /**
90
92
  * Specify an event listener for the specified built-in viewer event.
91
- * @param name Specify the event name.
93
+ * @param eventName Specify the event name.
92
94
  * @param callback The event listener.
93
95
  */
94
- on(name: string, callback: (event?: any, event1?: any, event2?: any) => void): void;
96
+ on(eventName: string, callback: (...param: any[]) => void): void;
95
97
  /**
96
98
  * Remove a built-in viewer event handler.
97
99
  * @param eventName Specify the event name.
98
100
  */
99
- off(eventName: string, callback?: (event: ViewerEvent) => void): boolean;
101
+ off(eventName: string, callback?: (...param: any[]) => void): void;
100
102
  }
101
103
  export interface DeviceInfo {
102
104
  deviceId: string;
@@ -128,106 +130,154 @@ export interface ViewerEvent {
128
130
  */
129
131
  pageY: number;
130
132
  }
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
133
+ export interface DocumentConfiguration {
134
+ scannerViewer?: ScannerViewer;
135
+ documentEditorSettings?: DocumentEditorSettings;
136
+ }
137
+ export interface ScannerViewer {
138
+ deviceId?: string; //camera id
139
+ maxDocuments?:number; //The maximum documents can be captured/loaded in to the buffer.
140
+ enableBorderDetection?: boolean; //Whether to enable border detection. The default value is true.
141
+ fullScreen?: boolean; //Whether to display the video in full screen. The default value is false.
142
+ polygonStyle?:{ //The sytle of the auto detect border.
143
+ stroke?: string; //default: "#fe8e14". Only supports #16 hexadecimal.
144
+ strokeWidth?: string; //default: "2px"
145
+ dash?: string; //The allowed value are "solid" and "dashed", the default value is "solid".
146
+ };
147
+ element?: HTMLDivElement | string; //Bind the elment or elment id.
148
+ //After binding, display the video in the spcified element, otherwise, display the video in full screen.
149
+ headerStyle?:{
150
+ background?: string; //background color of the head, default : "#000000". Only supports #16 hexadecimal.
151
+ color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
152
+ selectedColor?: string; //The color of the selected icon, default : "#fe8e14". Only supports #16 hexadecimal.
153
+ };
154
+ bodyStyle?:{
155
+ background?: string; //Background color when the video streaming is not full-screen, default : "#ffffff". Only supports #16 hexadecimal.
156
+ loaderBarSource?: string; //Waiting for the document to appear
157
+ };
158
+ footerStyle?:{
159
+ background?: string; //background color of the foot, default : "#000000". Only supports #16 hexadecimal.
160
+ color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
161
+ selectedColor?: string; //The color of the selected icon, default : "#fe8e14". Only supports #16 hexadecimal.
162
+ };
163
+ scanButtonStyle?:{
164
+ background?: string; //background color, default : "#fe8e14". Only supports #16 hexadecimal.
165
+ color?: string; //icon color, default : "#ffffff". Only supports #16 hexadecimal.
166
+ };
167
+ resolution?: {
168
+ visibility?: string; //Whether to display the resolution icon in the upper left corner, the value "visible":"hidden". The default value is "visible".
169
+ valueList?: any;
170
+ defaultValue?: Resolution; //Set the default value according to the value set in the valueList.
171
+ };
172
+ autoScan?: { //Automatically capture when a clear document is detected. Only applicable to video scanning.
173
+ visibility?:string; //Whether to display the automatic scan icon. The allowed value are "visible" and "hidden". The default value is "visible".
174
+ enableAutoScan?: boolean; //Whether to enable automatic scan. The default value is false.
175
+ };
176
+ autoDetect?: { //Only applicable to video scanning.
177
+ visibility?:string; //Whether to display the automatic border detection icon. The allowed value are "visible" and "hidden". The default value is "visible".
178
+ enableAutoDetect?: boolean; //Whether to enable automatic border detection. The default value is false.
179
+ acceptedPolygonConfidence?:number; //The default value is 80. The higher the setting, the more accurate the automatic border detection.
180
+ fpsLimit?: number; //The maximum number of frames detected per second. The default value is 3.
181
+ acceptedBlurryScore?:number; //The default value is 0.
182
+ autoCaptureDelay?: number; //The default value is 1000ms.
183
+ };
184
+ continuousScan?: boolean; //Whether to continuou capture. The default value is true.
185
+ switchCamera?: { //The default camera is the rear camera.
186
+ visibility?:string; //Whether to display the switch camera icon. The allowed value are "visible" and "hidden". The default value is "visible".
187
+ };
188
+
189
+ loadLocalFile?: {
190
+ visibility?:string; //Whether to display the load local file icon. The allowed value are "visible" and "hidden". The default value is "visible".
191
+ };
183
192
 
184
- funcConfirmExit?: (bExistImage: boolean) => void;
185
- //funcConfirmExit is the callback funtion
186
- //Return trueEnd this capture without saving the image data. Return false: Stay on the original viewer
187
- };
193
+ funcConfirmExit?: (bExistImage: boolean) => Promise<boolean>;
194
+ //funcConfirmExit is the callback funtion,
195
+ //Return Promise.resolve(true): End this capture without saving the image data. Return Promise.resolve(false): Stay on the original viewer
196
+ }
188
197
 
189
- filterViewer?: {
190
- visibility?: boolean; //Whether to display filter viewer. The default value is true.
198
+ export interface DocumentEditorSettings {
199
+ visibility?:string; //Whether to display the documentEditor. The allowed value are "visible" and "hidden". The default value is "visible".
200
+ element?: HTMLDivElement | string; //Bind the elment or elment id.
201
+ //After binding, display the video in the spcified element, otherwise, display the video in full screen.
202
+ defaultViewerName?:string; // default viewer. The allowed value are "cropViewer" and "mainViewer".
203
+ headerStyle?:{
204
+ background?: string; //background color of the head, default: "#000000". Only supports #16 hexadecimal.
205
+ color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
206
+ selectedColor?: string; //Selected icon color, default : "#fe8e14". Only supports #16 hexadecimal.
207
+ disabledColor?: string; //disabled color. default: "#808080"
208
+ };
209
+ bodyStyle?:{
210
+ background?: string; //Background color when the video streaming is not full-screen, default : "#ffffff". Only supports #16 hexadecimal.
211
+ loaderBarSource?: string; //Waiting for the document to appear
212
+ };
213
+ footerStyle?:{
214
+ background?: string; //background color of the foot, default : "#000000". Only supports #16 hexadecimal.
215
+ color?: string; //The color of the icons, default : "#ffffff". Only supports #16 hexadecimal.
216
+ selectedColor?: string; //Selected icon color, default: "#fe8e14". Only supports #16 hexadecimal.
217
+ };
218
+ insert?: { //Insert an image
219
+ visibility?:string; //Whether to display the insert icon. The allowed value are "visible" and "hidden". The default value is "visible".
220
+ position?: string; //Set whether to insert the image "before" or "after" the current image. The default value is "before".
221
+ };
191
222
 
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
- };
223
+ remove?: { //Remove an image
224
+ visibility?:string; //Whether to display the remove icon.The allowed value are "visible" and "hidden". The default value is "visible".
225
+ funcConfirmRemove?: () => Promise<boolean>;
226
+ //funcConfirmRemove is the callback funtion,
227
+ //Return Promise.resolve(true): delete the image data. Return Promise.resolve(false): Stay on the original viewer
228
+ };
196
229
 
197
- remove?: { //Remove an image
198
- visibility?: boolean; //Whether to display the remove icon. The default value is true.
199
- };
230
+ rotateLeft?: {
231
+ visibility?:string; //Whether to display the rotate left icon. The allowed value are "visible" and "hidden". The default value is "visible".
232
+ };
200
233
 
201
- rotateLeft?: {
202
- visibility?: boolean; //Whether to display the rotate left icon. The default value is true.
203
- };
204
-
205
234
  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.
235
+ visibility?:string; //Whether to display the filter icon. The allowed value are "visible" and "hidden". The default value is "visible".
236
+ valueList?:any;
237
+ defaultValue?: string; //Filter selected by default. By default, the original filter is selected.
238
+ applyToAll?: { //Apply to all documents
239
+ visibility?:string; //Whether to display the applyToAll icon. The allowed value are "visible" and "hidden". The default value is "visible".
240
+ enableApplyToAll?: boolean; //Whether to enable to apply to all documents, Default:false.
241
+ label?: string; //the label of the applyToAll, default: "Apply to all"
242
+ };
211
243
  };
212
-
213
- cropViewer?: {
214
- visibility?: boolean; //Whether to display the crop viewer. The default value is true.
244
+
245
+ crop?:{
246
+ visibility?:string; //Whether to display the crop icon. The allowed value are "visible" and "hidden". The default value is "visible".
247
+ };
248
+
249
+ cropViewer?:CropViewer;
250
+ funcConfirmExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
251
+ //funcConfirmExit is the callback funtion.
252
+ //Return Promise.resolve(EnumDWT_ConfirmExitType.Exit): Exit original viewer without saving the image data.
253
+ //Return Promise.resolve(EnumDWT_ConfirmExitType.SaveAndExit): Exit original viewer with saving the image data.
254
+ //Return Promise.resolve(EnumDWT_ConfirmExitType.Cancel): Stay on the original viewer
255
+ funcConfirmExitAfterSave?: (firedByDocumentEdit: boolean) => void;
256
+ //funcConfirmExitAfterSave is the callback funtion
257
+ }
258
+ export interface CropViewer {
259
+ visibility?: boolean; //Whether to display the crop viewer. The allowed value are "visible" and "hidden". The default value is "visible".
215
260
 
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
- };
261
+ polygonStyle?:{ //The polygon style in the crop viewer.
262
+ stroke?: string; //default : "#fe8e14". Only supports #16 hexadecimal.
263
+ strokeWidth?: string; //default: "2px"
264
+ dash?: string; //The allowed value are "solid" and "dashed", the default value is "solid".
265
+ };
221
266
 
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
- };
267
+ rotateLeft?:{
268
+ visibility?: string; //Whether to display the rotate left icon. The allowed value are "visible" and "hidden". The default value is "visible".
269
+ };
270
+ rotateRight?:{
271
+ visibility?: string; //Whether to display the rotate right icon. The allowed value are "visible" and "hidden". The default value is "visible".
231
272
  };
273
+ autoDetectBorder?:{
274
+ visibility?: string; //Whether to display the automatic border detection icon. The allowed value are "visible" and "hidden". The default value is "visible".
275
+ };
276
+ funcConfirmExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
277
+ //funcConfirmExit is the callback funtion.
278
+ //Return Promise.resolve(EnumDWT_ConfirmExitType.Exit): Exit original viewer without saving the image data.
279
+ //Return Promise.resolve(EnumDWT_ConfirmExitType.SaveAndExit): Exit original viewer with saving the image data.
280
+ //Return Promise.resolve(EnumDWT_ConfirmExitType.Cancel): Stay on the original viewer
232
281
  }
233
282
 
283
+
@@ -62,49 +62,58 @@ export interface PDFWSetting {
62
62
  /**
63
63
  * Specify the author.
64
64
  */
65
- author: string;
65
+ author?: string;
66
66
  /**
67
67
  * Specify the compression type.
68
68
  */
69
- compression: DynamsoftEnumsDWT.EnumDWT_PDFCompressionType | number;
69
+ compression?: DynamsoftEnumsDWT.EnumDWT_PDFCompressionType | number;
70
70
  /**
71
+ * Specify the page type.
72
+ * 0: page width&height decided by image
73
+ * 2: A4
74
+ * 4: A3
75
+ * 6: Letter
76
+ * 8: Legal
77
+ */
78
+ pageType?: number;
79
+ /**
71
80
  * Specify the creator.
72
81
  */
73
- creator: string;
82
+ creator?: string;
74
83
  /**
75
84
  * Specify the creation date.
76
85
  * Note that the argument should start with 'D:' like 'D:20181231'.
77
86
  */
78
- creationDate: string;
87
+ creationDate?: string;
79
88
  /**
80
89
  * Specify the key words.
81
90
  */
82
- keyWords: string;
91
+ keyWords?: string;
83
92
  /**
84
93
  * Specify the modified date.
85
94
  * Note that the argument should start with 'D:' like 'D:20181231'.
86
95
  */
87
- modifiedDate: string;
96
+ modifiedDate?: string;
88
97
  /**
89
98
  * Specify the producer.
90
99
  */
91
- producer: string;
100
+ producer?: string;
92
101
  /**
93
102
  * Specify the subject.
94
103
  */
95
- subject: string;
104
+ subject?: string;
96
105
  /**
97
106
  * Specify the title.
98
107
  */
99
- title: string;
108
+ title?: string;
100
109
  /**
101
110
  * Specify the PDF version. For example, '1.5'.
102
111
  */
103
- version: string;
112
+ version?: string;
104
113
  /**
105
114
  * Specify the quality of the images in the file.
106
115
  * The value ranges from 0 to 100.
107
116
  * Only valid when the {compression} is 'JPEG' or 'JPEG2000'.
108
117
  */
109
- quality: number;
118
+ quality?: number;
110
119
  }
@@ -1572,7 +1572,9 @@ export namespace DynamsoftEnumsDWT {
1572
1572
  /** CCITT modified Huffman RLE. */
1573
1573
  PDF_RLE = 4,
1574
1574
  /** JPEG compression. */
1575
- PDF_JPEG = 5
1575
+ PDF_JPEG = 5,
1576
+ PDF_JP2000 = 6,
1577
+ PDF_JBIG2 = 7
1576
1578
  }
1577
1579
  /** ICAP_PIXELTYPE values (PT_ means Pixel Type) */
1578
1580
  enum EnumDWT_PixelType {
@@ -1851,4 +1853,13 @@ export namespace DynamsoftEnumsDWT {
1851
1853
  TDM_GENERAL_WIDTH_CONCENTRATION = 2,
1852
1854
  TDM_SKIP = 0
1853
1855
  }
1856
+ enum EnumDWT_ConfirmExitType {
1857
+ Cancel = 0, //cancel, Stay on the original viewer
1858
+ Exit = 1, //Exit original viewer without saving the image data
1859
+ SaveAndExit = 2 //Exit original viewer with saving the image data
1860
+ }
1861
+ enum EnumDWT_SelectionMode {
1862
+ Single = 0,
1863
+ Multiple = 1
1864
+ }
1854
1865
  }
@@ -156,10 +156,6 @@ export interface DSLibEnv {
156
156
  * Whether the operating system is Windows.
157
157
  */
158
158
  readonly bWin: boolean;
159
- /**
160
- * Whether the operating system is 64bit Windows.
161
- */
162
- readonly bWin64: boolean;
163
159
  /**
164
160
  * The base path.
165
161
  */
@@ -188,14 +184,6 @@ export interface DSLibEnv {
188
184
  * Whether it is a pad viewer.
189
185
  */
190
186
  isPadViewer(): boolean;
191
- /**
192
- * Whether the platform is 64bit.
193
- */
194
- readonly isX64: boolean;
195
- /**
196
- * Information about macOSX.
197
- */
198
- readonly macOSX: string;
199
187
  /**
200
188
  * OS version.
201
189
  */
@@ -333,23 +321,23 @@ export interface DWTPro {
333
321
  /**
334
322
  * A callback function that is executed when the WebTwain related files are not found.
335
323
  */
336
- OnWebTwainNotFound: () => {};
324
+ OnWebTwainNotFound: () => void;
337
325
  /**
338
326
  * A callback function that is executed after a time-consuming operation.
339
327
  */
340
- OnWebTwainPostExecute: () => {};
328
+ OnWebTwainPostExecute: () => void;
341
329
  /**
342
330
  * A callback function that is executed before a time-consuming operation.
343
331
  */
344
- OnWebTwainPreExecute: () => {};
332
+ OnWebTwainPreExecute: () => void;
345
333
  /**
346
334
  * A callback function that is executed when a WebTwain instance is created.
347
335
  */
348
- OnWebTwainReady: () => {};
336
+ OnWebTwainReady: () => void;
349
337
  /**
350
338
  * A callback function that is executed right before the creation of a WebTwain instance.
351
339
  */
352
- OnWebTwainWillInit: () => {};
340
+ OnWebTwainWillInit: () => void;
353
341
  /**
354
342
  * The version of the PDF module (not the rasterizer).
355
343
  */
@@ -522,5 +510,13 @@ export interface WasmConfig {
522
510
  */
523
511
  fetchOptions: any;
524
512
  }
525
- declare const Dynamsoft: (typeof DynamsoftStatic);
513
+ export interface DWTInstall {
514
+ funcConfirmRemove?: () => Promise<boolean>;
515
+ funcConfirmExit?: (bExistImage: boolean) => Promise<boolean>;
516
+ funcConfirmExitAfterSave?: (firedByDocumentEdit: boolean) => void;
517
+ funcConfirmCropViewerExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
518
+ funcConfirmMainViewerExit?: (bChanged: boolean, previousViewerName: string) => Promise<Number | DynamsoftEnumsDWT.EnumDWT_ConfirmExitType>;
519
+ }
520
+ declare const Dynamsoft: (DWTInstall & typeof DynamsoftStatic);
521
+ //declare const Dynamsoft: (typeof DynamsoftStatic);
526
522
  export default Dynamsoft;
@@ -84,14 +84,8 @@ export interface WebTwainAcquire extends WebTwainEdit {
84
84
  ): boolean | void;
85
85
  /**
86
86
  * Bring up the Source Selection User Interface (UI) for the user to choose a data source.
87
- * @param successCallback A callback function that is executed if the request succeeds.
88
- * @param failureCallback A callback function that is executed if the request fails.
89
- * @argument errorCode The error code.
90
- * @argument errorString The error string.
91
87
  */
92
88
  SelectSourceAsync(
93
- successCallBack?: () => void,
94
- failureCallBack?: (errorCode: number, errorString: string) => void
95
89
  ): Promise<boolean>;
96
90
  /**
97
91
  * Select a data source by its index.
@@ -653,6 +647,21 @@ export interface DeviceConfiguration {
653
647
  * How much extended information is retrieved. Only valid when {IfGetExtImageInfo} is true.
654
648
  */
655
649
  extendedImageInfoQueryLevel?: number;
650
+ /**
651
+ * Whether to simulate the manufacturer's UI inside the client-side browser (only effective when IfShowUI is true).
652
+ * (Added in 16.2)
653
+ */
654
+ RemoteScan?:boolean;
655
+ /**
656
+ * Whether to simulate the manufacturer's UI inside the client-side browser (only effective when IfShowUI and RemoteScan are both true and the WebTwain instance doing the scan has no viewer of its own).
657
+ * (Added in 16.2)
658
+ */
659
+ ShowRemoteScanUI?:boolean;
660
+ /**
661
+ * Specify a source by its index.
662
+ * (Added in 16.2)
663
+ */
664
+ SelectSourceByIndex?: number;
656
665
  }
657
666
  export interface SourceDetails {
658
667
  /**
@@ -982,23 +991,23 @@ export interface CapabilityDetails {
982
991
  /**
983
992
  * The container type of the Capability
984
993
  */
985
- conType: ValueAndLabel;
994
+ conType?: ValueAndLabel;
986
995
  /**
987
996
  * The index for the current value of the Capability
988
997
  */
989
- curIndex: number;
998
+ curIndex?: number;
990
999
  /**
991
1000
  * The current value of the Capability
992
1001
  */
993
- curValue: ValueAndLabel;
1002
+ curValue?: ValueAndLabel;
994
1003
  /**
995
1004
  * The index for the default value of the Capability
996
1005
  */
997
- defIndex: number;
1006
+ defIndex?: number;
998
1007
  /**
999
1008
  * The operation types that are supported by the Capability. Types include {"get", "set", "reset" "getdefault", "getcurrent"}
1000
1009
  */
1001
- query: string[];
1010
+ query?: string[];
1002
1011
  /**
1003
1012
  * The value type of the Capability. Value types include
1004
1013
  * TWTY_BOOL: 6
@@ -1015,21 +1024,22 @@ export interface CapabilityDetails {
1015
1024
  * TWTY_UINT16: 4
1016
1025
  * TWTY_int: 5
1017
1026
  */
1018
- valueType: ValueAndLabel;
1027
+ valueType?: ValueAndLabel;
1019
1028
  /**
1020
1029
  * The available values of the Capability
1021
1030
  */
1022
- values: ValueAndLabel[];
1031
+ values?: ValueAndLabel[];
1023
1032
  }
1024
1033
  export interface ValueAndLabel {
1025
1034
  /**
1026
1035
  * Numeric representation of the item
1027
1036
  */
1028
- value: DynamsoftEnumsDWT.EnumDWT_Cap | DynamsoftEnumsDWT.EnumDWT_CapType | DynamsoftEnumsDWT.EnumDWT_CapValueType | number;
1037
+ value?: DynamsoftEnumsDWT.EnumDWT_Cap | DynamsoftEnumsDWT.EnumDWT_CapType | DynamsoftEnumsDWT.EnumDWT_CapValueType | number;
1029
1038
  /**
1030
1039
  * Label or name of the item
1031
1040
  */
1032
- label: string;
1041
+ label?: string;
1042
+ [key:string]:any;
1033
1043
  }
1034
1044
  export interface Capabilities {
1035
1045
  /**
@@ -1049,7 +1059,7 @@ export interface CapabilitySetup {
1049
1059
  /**
1050
1060
  * The value to set to the capability or the value of the capability after setting.
1051
1061
  */
1052
- curValue: number | string;
1062
+ curValue: number | string | object;
1053
1063
  errorCode?: number;
1054
1064
  errorString?: string;
1055
1065
  /**