dwt 17.2.5 → 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 (59) hide show
  1. package/LICENSE.txt +8 -9
  2. package/README.md +13 -13
  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 +254 -373
  15. package/dist/dynamsoft.webtwain.min.mjs +262 -379
  16. package/dist/src/{dynamsoft.crypto-1.7.2.2.wasm → dynamsoft.crypto-1.7.3.wasm} +0 -0
  17. package/dist/src/{dynamsoft.imageProc-1.7.2.2.wasm → dynamsoft.imageProc-1.7.3.wasm} +0 -0
  18. package/dist/src/{dynamsoft.imageProc-sn-1.7.2.2.wasm → dynamsoft.imageProc-sn-1.7.3.wasm} +0 -0
  19. package/dist/src/{dynamsoft.imagecore-1.7.2.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.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.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.2.wasm → dynamsoft.crypto-1.7.3.wasm} +0 -0
  30. package/dist/src/fastcomp/{dynamsoft.imageProc-1.7.2.2.wasm → dynamsoft.imageProc-1.7.3.wasm} +0 -0
  31. package/dist/src/fastcomp/{dynamsoft.imagecore-1.7.2.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.2.wasm → dynamsoft.pdfWriter-1.7.3.wasm} +0 -0
  35. package/dist/types/Addon.Camera.d.ts +145 -95
  36. package/dist/types/Addon.PDF.d.ts +2 -2
  37. package/dist/types/Dynamsoft.Enum.d.ts +12 -1
  38. package/dist/types/Dynamsoft.d.ts +9 -13
  39. package/dist/types/WebTwain.Buffer.d.ts +48 -14
  40. package/dist/types/WebTwain.Viewer.d.ts +102 -4
  41. package/dist/types/index.d.ts +1 -1
  42. package/package.json +2 -2
  43. package/samples/AcquireImage.html +1 -1
  44. package/samples/CustomScan.html +1 -1
  45. package/samples/Edit.html +1 -1
  46. package/samples/LoadAndSaveImages.html +1 -1
  47. package/samples/Navigation.html +1 -1
  48. package/samples/PDFRasterizer.html +1 -1
  49. package/samples/ReadBarcode.html +1 -1
  50. package/samples/ScanOrCapture.html +1 -1
  51. package/samples/Thumbnail.html +1 -1
  52. package/dist/addon/dbrjs/dbr-8.6.1.full.wasm +0 -0
  53. package/dist/addon/dbrjs/dbr-8.6.1.full.wasm.js +0 -134
  54. package/dist/addon/dbrjs/dbr-8.6.1.worker.js +0 -113
  55. package/dist/src/dynamsoft.imageio-1.7.2.2.wasm +0 -0
  56. package/dist/src/dynamsoft.imageio_wasm-1.7.2.2.js +0 -115
  57. package/dist/src/dynamsoft.pdfReader_wasm-1.7.2.2.js +0 -90
  58. package/dist/src/fastcomp/dynamsoft.imageio-1.7.2.2.wasm +0 -0
  59. package/dist/src/fastcomp/dynamsoft.imageio_wasm-1.7.2.2.js +0 -115
@@ -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,9 +81,9 @@ 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
  */
@@ -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) => boolean;
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) => boolean;
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
- };
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
+ };
188
192
 
189
- filterViewer?: {
190
- visibility?: boolean; //Whether to display filter viewer. The default value is true.
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
+ }
191
197
 
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
- };
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
+ };
196
222
 
197
- remove?: { //Remove an image
198
- visibility?: boolean; //Whether to display the remove icon. The default value is true.
199
- };
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
+ };
200
229
 
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.
230
+ rotateLeft?: {
231
+ visibility?:string; //Whether to display the rotate left icon. The allowed value are "visible" and "hidden". The default value is "visible".
211
232
  };
212
233
 
213
- cropViewer?: {
214
- visibility?: boolean; //Whether to display the crop viewer. The default value is true.
234
+ filter?: {
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
+ };
243
+ };
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
+
@@ -69,9 +69,9 @@ export interface PDFWSetting {
69
69
  compression?: DynamsoftEnumsDWT.EnumDWT_PDFCompressionType | number;
70
70
  /**
71
71
  * Specify the page type.
72
- * 0 page width&height decided by image
72
+ * 0: page width&height decided by image
73
73
  * 2: A4
74
- * 4 A3
74
+ * 4: A3
75
75
  * 6: Letter
76
76
  * 8: Legal
77
77
  */
@@ -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
  */
@@ -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;
@@ -272,28 +272,37 @@ export interface WebTwainBuffer extends WebTwainIO {
272
272
  */
273
273
  GetTagListByIndex(index:number): TagName[];
274
274
  /**
275
- * Get the current file name.
275
+ * Get the current document name.
276
276
  */
277
- GetCurrentFileName(): string;
277
+ GetCurrentDocumentName(): string;
278
278
  /**
279
- * Create the file.
280
- * @param fileName Specify the file name.
279
+ * Create the document.
280
+ * @param fileName Specify the document name.
281
281
  */
282
- CreateFile(fileName: string):boolean;
282
+ CreateDocument(documentName: string):boolean;
283
283
  /**
284
- * open the file.
285
- * @param fileName Specify the file name.
284
+ * open the document.
285
+ * @param fileName Specify the document name.
286
286
  */
287
- OpenFile(fileName: string):boolean;
287
+ OpenDocument(documentName: string):boolean;
288
288
  /**
289
- * remove the file.
290
- * @param fileName Specify the file name.
289
+ * remove the document.
291
290
  */
292
- RemoveFile():boolean;
291
+ RemoveDocument(documentName:string):boolean;
293
292
  /**
294
- * Get the info of the all files.
293
+ * Rename a document.
294
+ * @argument oldDocumentName Specify the old document name.
295
+ * @argument newDocumentName Specify the new document name.
296
+ */
297
+ RenameDocument(oldDocumentName:string, newDocumentName:string):boolean;
298
+ /**
299
+ * Get the info of the all documents.
300
+ */
301
+ GetDocumentInfoList(): DocumentInfo[];
302
+ /**
303
+ * Gets the RawData for the specified image captured from camera.
295
304
  */
296
- GetFileInfoList(): FileInfo[];
305
+ GetRawDataAsync(index: number): Promise<RawData>;
297
306
  }
298
307
 
299
308
  export interface TagName {
@@ -305,7 +314,32 @@ export interface TagInfo {
305
314
  imageIds: number[];
306
315
  }
307
316
 
308
- export interface FileInfo {
317
+ export interface DocumentInfo {
309
318
  name: string;
310
319
  imageIds: number[];
311
320
  }
321
+
322
+ export interface RawData {
323
+ displayImage:{ //Data of the display image, after filter and crop effects
324
+ data: Blob;
325
+ bitDepth: number;
326
+ height: number;
327
+ resolutionX: number;
328
+ resolutionY: number;
329
+ width: number;
330
+ },
331
+ documentData:{
332
+ angle: number; //the clockwise rotation angle of the original image
333
+ polygon: [{x:number, y:number},{x:number, y:number},{x:number, y:number},{x:number, y:number}]; //selection area
334
+ filterValue: string;
335
+ originImage:{ //Data of the original image
336
+ bitDepth: number;
337
+ data: Blob;
338
+ height: number;
339
+ width: number;
340
+ resolutionX: number;
341
+ resolutionY: number;
342
+ }
343
+ }
344
+ }
345
+
@@ -1,5 +1,6 @@
1
1
  import { WebTwainAcquire } from "./WebTwain.Acquire";
2
- import { Resolution } from "./Addon.Camera";
2
+ import { DocumentConfiguration, Resolution } from "./Addon.Camera";
3
+ import { DynamsoftEnumsDWT } from "./Dynamsoft.Enum";
3
4
 
4
5
  export interface WebTwainViewer extends WebTwainAcquire {
5
6
  /**
@@ -193,6 +194,16 @@ export interface DynamsoftViewer {
193
194
  * [Description] When set to true, will make sure the first image in the viewer is always selected when scrolling through multiple images.
194
195
  */
195
196
  autoChangeIndex: boolean;
197
+ /**
198
+ * [Scope] Main viewer
199
+ * [Description] Return or set the selection mode used when acquiring images.
200
+ */
201
+ selectionMode: number | DynamsoftEnumsDWT.EnumDWT_SelectionMode;
202
+ /**
203
+ * [Scope] Main viewer
204
+ * [Description] Set whether to allow page dragging to reorder the pages.
205
+ */
206
+ allowPageDragging?: boolean;
196
207
  /**
197
208
  * [Scope] Main viewer
198
209
  * [Description] Return the index of the next image of the currently selected image.
@@ -234,7 +245,7 @@ export interface DynamsoftViewer {
234
245
  /**
235
246
  * [Scope] Global
236
247
  * [Description] Create a thumbnail viewer with specified settings.
237
- * @param editorSettings The thumbnailViewerSettings settings. If not set, the default setting is used.
248
+ * @param thumbnailViewerSettings The thumbnailViewerSettings settings. If not set, the default setting is used.
238
249
  */
239
250
  createThumbnailViewer(thumbnailViewerSettings?: ThumbnailViewerSettings): ThumbnailViewer;
240
251
  /**
@@ -245,6 +256,13 @@ export interface DynamsoftViewer {
245
256
  * @param ifFull Whether to display the element in full screen.
246
257
  */
247
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;
248
266
  /**
249
267
  * [Scope] Global
250
268
  * [Description] Return the current UI settings (from DVS itself)
@@ -278,6 +296,18 @@ export interface DynamsoftViewer {
278
296
  * @param type Specify a type to fit. (width, height, both)
279
297
  */
280
298
  fitWindow(type?: 'height' | 'width'): void;
299
+ /**
300
+ * [Scope] Main viewer
301
+ * Update checkbox style
302
+ * @argument checkboxSettings Settings for checkboxex.
303
+ */
304
+ updateCheckboxStyle(checkboxSettings?: CheckboxSettings): void;
305
+ /**
306
+ * [Scope] Main viewer
307
+ * Update page number style
308
+ * @argument pageNumberSettings Settings for page numbers.
309
+ */
310
+ updatePageNumberStyle(pageNumberSettings?: PageNumberSettings): void;
281
311
  /**
282
312
  * [Description] Set the CSS class name of the specified button defined in updateUISetting.
283
313
  * @param name Specify the button.
@@ -299,9 +329,9 @@ export interface DynamsoftViewer {
299
329
  /**
300
330
  * [Scope] Global
301
331
  * [Description] Create a document webviewer with specified settings.
302
- * @param templateName The document webviewer settings. If not set, the default setting is used.
332
+ * @param templateName The document webviewer settings. If not set, the default setting is used. The allowed value is "documentCapture".
303
333
  */
304
- createTemplate(templateName?: string): DocumentViewerTemplate;
334
+ createTemplate(templateName?: string, documentConfiguration?: DocumentConfiguration): DocumentViewerTemplate;
305
335
  /**
306
336
  * [Scope] Global
307
337
  * [Description] Create a Dynamsoft Viewer instance and bind it to the WebTwain instance.
@@ -543,6 +573,8 @@ export interface ThumbnailViewerSettings {
543
573
  * Allow any CSS rules
544
574
  */
545
575
  selectedPageBackground?: string;
576
+ checkbox?: CheckboxSettings;
577
+ pageNumber?: PageNumberSettings;
546
578
  }
547
579
  export interface CustomElement {
548
580
  /**
@@ -601,6 +633,18 @@ export interface ThumbnailViewer {
601
633
  * [Description] Set the view mode.
602
634
  */
603
635
  updateViewMode(viewMode: ViewMode): void;
636
+ /**
637
+ * [Scope] Thumbnail viewer
638
+ * Update checkbox style
639
+ * @argument checkboxSettings Settings for checkboxex.
640
+ */
641
+ updateCheckboxStyle(checkboxSettings?: CheckboxSettings): void;
642
+ /**
643
+ * [Scope] Thumbnail viewer
644
+ * Update page number style
645
+ * @argument pageNumberSettings Settings for page numbers.
646
+ */
647
+ updatePageNumberStyle(pageNumberSettings?: PageNumberSettings): void;
604
648
  /**
605
649
  * [Scope] Thumbnail viewer
606
650
  * [Description] Specify an event listener for the viewer event.
@@ -739,6 +783,23 @@ export interface ThumbnailViewer {
739
783
  */
740
784
  selectedImageBackground: string;
741
785
  }
786
+ export interface DocumentEditor {
787
+ /**
788
+ * [Scope] DocumentEditor viewer
789
+ * [Description] Show the DocumentEditor viewer.
790
+ */
791
+ show(): void;
792
+ /**
793
+ * [Scope] DocumentEditor viewer
794
+ * [Description] Hide the DocumentEditor viewer.
795
+ */
796
+ hide(): void;
797
+ /**
798
+ * [Scope] DocumentEditor viewer
799
+ * [Description] Delete the DocumentEditor viewer.
800
+ */
801
+ dispose(): void;
802
+ }
742
803
 
743
804
  export interface ViewMode {
744
805
  columns?: number;
@@ -807,3 +868,40 @@ export interface DocumentViewerTemplate {
807
868
  */
808
869
  getCustomElement(): CustomElement;
809
870
  }
871
+ export interface CheckboxSettings {
872
+ visibility?: string; //"visible":hidden", default:"hidden"
873
+ width?: number | string; //default: "24px", number unit: px, string value: "24px"/"10%", relative to parent container
874
+ height?: number | string; //default: "24px", number unit: px, string value: "24px"/"10%", relative to parent container
875
+ background?: string; //default: "#ffffff"
876
+ borderWidth?: number | string; //default: "2px", unit: px, percentage value not supported
877
+ borderColor?: string; //default : "#000000"
878
+ checkMarkColor?: string; //default: "#000000"
879
+ checkMarkLineWidth?: number | string; //default: "2px", unit: px, percentage value not supported
880
+ borderRadius?: number | string; //default: 0, number unit: px, string value: "10px"/"10%", relative to itself
881
+ opacity?: number; //default: 0.5, value range [0-1], value greater 1 defaults to 1
882
+ left?: number | string; //default: 0, number unit: px, string value: "10px"/"10%", relative to parent container
883
+ top?: number | string; //default: 0, number unit: px, string value: "10px"/"10%", relative to parent container
884
+ right?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to parent container
885
+ bottom?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to parent container
886
+ translateX?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to itself
887
+ translateY?: number | string; //default: ""; number unit: px, string value: "10px"/"10%", relative to itself
888
+ }
889
+ export interface PageNumberSettings {
890
+ visibility?: string; //"visible": hidden", default: "hidden"
891
+ width?: number | string; //default: "24px", number unit: px, string value: "24px"/"10%", relative to parent container
892
+ height?: number | string, //default: "24px", number unit: px, string value: "24px"/"10%", relative to parent container
893
+ background?: string; //default: "#ffffff"
894
+ borderWidth?: number | string; //default: "1px", unit: px, percentage value not supported
895
+ borderColor?: string; //default: "#a79898"
896
+ borderRadius?: number | string; //default: "50%", number unit: px, string value: "10px"/"10%", relative to itself
897
+ opacity?: number; //default: 0.5, value range [0-1], value greater 1 defaults to 1
898
+ color?: string; //default : "#000000", supports #16 hexadecimal only
899
+ fontFamily?: string; //default : "sans-serif"
900
+ fontSize?: number | string; //default: 12, unit: px, percentage value not supported
901
+ left?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to parent container
902
+ top?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to parent container
903
+ right?: number | string; //default: 0, number unit: px, string value: "10px"/"10%", relative to parent container
904
+ bottom?: number | string; //default: 0, number unit: px, string value: "10px"/"10%", relative to parent container
905
+ translateX?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to itself
906
+ translateY?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to itself
907
+ }
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * Copyright 2022, Dynamsoft Corporation
16
16
  * Author: Dynamsoft Support Team
17
- * Version: 17.2
17
+ * Version: 17.3
18
18
  */
19
19
  import Dynamsoft from "./Dynamsoft";
20
20
  export default Dynamsoft;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dwt",
3
- "version": "17.2.5",
3
+ "version": "17.3.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.6.1"
10
+ "dynamsoft-javascript-barcode": "8.8.7"
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": {},