dwt 18.2.1 → 18.4.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.
@@ -90,8 +90,8 @@ export interface WebTwainBuffer extends WebTwainIO {
90
90
  */
91
91
  GetImageYResolution(index: number): number;
92
92
  /**
93
- * [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
94
- * [Alternative] Read SelectedImagesIndices instead.
93
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `SelectedImagesIndices` instead.
94
+ * Return an index from the selected indices array.
95
95
  * @param indexOfIndices Specify the index of the specified image.
96
96
  */
97
97
  GetSelectedImageIndex(indexOfIndices: number): number;
@@ -166,8 +166,8 @@ export interface WebTwainBuffer extends WebTwainIO {
166
166
  */
167
167
  IsBlankImage(index: number): boolean;
168
168
  /**
169
- * [Deprecation] Detect whether a certain area on an image is blank.
170
- * [Alternative] Use IsBlankImage or IsBlankImageExpress instead.
169
+ * @deprecated since version 10.1. This function will be removed in future versions. Use `IsBlankImage` or `IsBlankImageExpress` instead.
170
+ * Detect whether a certain area on an image is blank.
171
171
  * @param index Specify the image.
172
172
  * @param left The x-coordinate of the upper-left corner of the rectangle.
173
173
  * @param top The y-coordinate of the upper-left corner of the rectangle.
@@ -181,6 +181,14 @@ export interface WebTwainBuffer extends WebTwainIO {
181
181
  * @param index Specify the image.
182
182
  */
183
183
  IsBlankImageExpress(index: number): boolean;
184
+ /**
185
+ * Check whether the specified image is blank.
186
+ * @param index Specify the image.
187
+ */
188
+ IsBlankImageAsync(index: number, options?: {
189
+ minBlockHeight?: number,//default value: 10
190
+ maxBlockHeight?: number //default value: 30
191
+ }): Promise < boolean > ;
184
192
  /**
185
193
  * Return or set how many images can be held in the buffer.
186
194
  */
@@ -209,8 +217,8 @@ export interface WebTwainBuffer extends WebTwainIO {
209
217
  */
210
218
  SelectAllImages(): number[];
211
219
  /**
212
- * [Deprecation] Return how many images are selected.
213
- * [Alternative] Read the length of SelectedImagesIndices instead.
220
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use the length of SelectedImagesIndices instead.
221
+ * Return how many images are selected.
214
222
  */
215
223
  SelectedImagesCount: number;
216
224
  /**
@@ -223,6 +231,7 @@ export interface WebTwainBuffer extends WebTwainIO {
223
231
  */
224
232
  SelectImages(indices: number[]): boolean;
225
233
  /**
234
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `Viewer.selectionRectAspectRatio` instead.
226
235
  * Specify a aspect ratio to be used when selecting a rectangle on an image.
227
236
  */
228
237
  SelectionRectAspectRatio: number;
@@ -232,8 +241,8 @@ export interface WebTwainBuffer extends WebTwainIO {
232
241
  */
233
242
  SetDefaultTag(tag: string): boolean;
234
243
  /**
235
- * [Deprecation] You can use the method to select images programatically.
236
- * [Alternative] Use SelectImages() or SelectAllImages() instead.
244
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `SelectImages` and `SelectAllImages` instead.
245
+ * You can use the method to select images programatically.
237
246
  * @param indexOfIndices The index of an array that holds the indices of selected images.
238
247
  * @param index The index of an image that you want to select.
239
248
  */
@@ -303,6 +312,62 @@ export interface WebTwainBuffer extends WebTwainIO {
303
312
  * Gets the RawData for the specified image captured from camera.
304
313
  */
305
314
  GetRawDataAsync(index: number): Promise<RawData>;
315
+ /*
316
+ * Move selected images to another document.
317
+ * @argument from The source document document name.
318
+ * @argument to The destination document name.
319
+ */
320
+ MoveToDocumentAsync(from: string, to: string): Promise<void>;
321
+ /*
322
+ * Move selected images to another document.
323
+ * @argument from The source document document name.
324
+ * @argument to The destination document name.
325
+ * @argument sourceIndices The indices of the images to be moved.
326
+ */
327
+ MoveToDocumentAsync(from: string, to: string, sourceIndices: number[]): Promise<void>;
328
+ /*
329
+ * Move selected images to another document.
330
+ * @argument from The source document document name.
331
+ * @argument to The destination document name.
332
+ * @argument targetIndex The index at which the source images should be inserted into the new document. If not specifed, the images will be appended to the destination document.
333
+ */
334
+ MoveToDocumentAsync(from: string, to: string, targetIndex: number): Promise<void>;
335
+ /*
336
+ * Move selected images to another document.
337
+ * @argument from The source document document name.
338
+ * @argument to The destination document name.
339
+ * @argument sourceIndices The indices of the images to be moved.
340
+ * @argument targetIndex The index at which the source images should be inserted into the new document. If not specifed, the images will be appended to the destination document.
341
+ */
342
+ MoveToDocumentAsync(from: string, to: string, sourceIndices: number[], targetIndex: number): Promise<void>;
343
+ /*
344
+ * Copy selected images to another document.
345
+ * @argument from The source document document name.
346
+ * @argument to The destination document name.
347
+ */
348
+ CopyToDocumentAsync(from: string, to: string): Promise<void>;
349
+ /*
350
+ * Copy selected images to another document.
351
+ * @argument from The source document document name.
352
+ * @argument to The destination document name.
353
+ * @argument sourceIndices The indices of the images to be copied.
354
+ */
355
+ CopyToDocumentAsync(from: string, to: string, sourceIndices: number[]): Promise<void>;
356
+ /*
357
+ * Copy selected images to another document.
358
+ * @argument from The source document document name.
359
+ * @argument to The destination document name.
360
+ * @argument targetIndex The index at which the source images should be inserted into the new document. If not specifed, the images will be appended to the destination document.
361
+ */
362
+ CopyToDocumentAsync(from: string, to: string, targetIndex: number): Promise<void>;
363
+ /*
364
+ * Copy selected images to another document.
365
+ * @argument from The source document document name.
366
+ * @argument to The destination document name.
367
+ * @argument sourceIndices The indices of the images to be copied.
368
+ * @argument targetIndex The index at which the source images should be inserted into the new document. If not specifed, the images will be appended to the destination document.
369
+ */
370
+ CopyToDocumentAsync(from: string, to: string, sourceIndices: number[]|number, targetIndex: number): Promise<void>;
306
371
  }
307
372
 
308
373
  export interface TagName {
@@ -3,6 +3,7 @@ import { WebTwainBuffer } from "./WebTwain.Buffer";
3
3
 
4
4
  export interface WebTwainEdit extends WebTwainBuffer {
5
5
  /**
6
+ * @deprecated since version 16.2. This function will be removed in future versions. Use `Viewer.createImageEditor` instead.
6
7
  * Show the built-in image editor. If called without any arguments while the editor is open, it'll close the editor.
7
8
  * @param divId Specify a div element to hold the editor.
8
9
  * @param width Specify the width of the editor.
@@ -353,8 +354,8 @@ export interface WebTwainEdit extends WebTwainBuffer {
353
354
  */
354
355
  BackgroundFillColor: number;
355
356
  /**
356
- * [Deprecation] Add text on an image.
357
- * [Alternative] Annotation feature to be added in a later version.
357
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Annotation feature to be added in a later version.
358
+ * Add text on an image.
358
359
  * @param index the index of the image that you want to add text to.
359
360
  * @param x the x coordinate for the text.
360
361
  * @param y the y coordinate for the text.
@@ -375,8 +376,8 @@ export interface WebTwainEdit extends WebTwainBuffer {
375
376
  backgroundOpacity: number
376
377
  ): boolean;
377
378
  /**
378
- * [Deprecation] Create the font for adding text using the method AddText.
379
- * [Alternative] Annotation feature to be added in a later version.
379
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Annotation feature to be added in a later version.
380
+ * Create the font for adding text using the method AddText.
380
381
  * @param height Specifies the desired height (in logical units) of the font.
381
382
  * The absolute value of nHeight must not exceed 16,384 device units after it is converted.
382
383
  * For all height comparisons, the font mapper looks for the largest font that does not
@@ -430,8 +431,8 @@ export interface WebTwainEdit extends WebTwainBuffer {
430
431
  faceName: string
431
432
  ): boolean;
432
433
  /**
433
- * [Deprecation] Decorates image of a specified index in buffer with rectangles of transparent color.
434
- * [Alternative] Annotation feature to be added in a later version.
434
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Annotation feature to be added in a later version.
435
+ * Decorates image of a specified index in buffer with rectangles of transparent color.
435
436
  * @param index specifies the index of image in buffer. The index is 0-based.
436
437
  * @param left Specify the rectangle (leftmost coordinate).
437
438
  * @param top Specify the rectangle (topmost coordinate).
@@ -24,11 +24,13 @@ export interface WebTwainIO extends WebTwainUtil {
24
24
  */
25
25
  HttpFieldNameOfUploadedImage: string;
26
26
  /**
27
- * [Deprecation] Return or set the password used to log into the HTTP server.
27
+ * @deprecated since version 10.1. This property will be removed in future versions.
28
+ * Return or set the password used to log into the HTTP server.
28
29
  */
29
30
  HTTPPassword: string;
30
31
  /**
31
- * [Deprecation] Return or set the user name used to log into the HTTP server.
32
+ * @deprecated since version 10.1. This property will be removed in future versions.
33
+ * Return or set the user name used to log into the HTTP server.
32
34
  */
33
35
  HTTPUserName: string;
34
36
  /**
@@ -73,42 +75,52 @@ export interface WebTwainIO extends WebTwainUtil {
73
75
  */
74
76
  TIFFCompressionType: DynamsoftEnumsDWT.EnumDWT_TIFFCompressionType | number;
75
77
  /**
78
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
76
79
  * Return or set the name of the person who creates the PDF document.
77
80
  */
78
81
  PDFAuthor: string;
79
82
  /**
83
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
80
84
  * Return or set the compression type of PDF files. This is a runtime property.
81
85
  */
82
86
  PDFCompressionType: DynamsoftEnumsDWT.EnumDWT_PDFCompressionType | number;
83
87
  /**
88
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
84
89
  * Return or set the date when the PDF document is created.
85
90
  */
86
91
  PDFCreationDate: string;
87
92
  /**
93
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
88
94
  * Return or set the name of the application that created the original document, if the PDF document is converted from another form.
89
95
  */
90
96
  PDFCreator: string;
91
97
  /**
98
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
92
99
  * Return or set the keywords associated with the PDF document.
93
100
  */
94
101
  PDFKeywords: string;
95
102
  /**
103
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
96
104
  * Return or set the date when the PDF document is last modified.
97
105
  */
98
106
  PDFModifiedDate: string;
99
107
  /**
108
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
100
109
  * Return or set the name of the application that converted the PDF document from its native.
101
110
  */
102
111
  PDFProducer: string;
103
112
  /**
113
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
104
114
  * Return or set the subject of the PDF document.
105
115
  */
106
116
  PDFSubject: string;
107
117
  /**
118
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
108
119
  * Return or set the title of the PDF document.
109
120
  */
110
121
  PDFTitle: string;
111
122
  /**
123
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `PDF.Write.Setup` instead.
112
124
  * Return or set the value of the PDF version.
113
125
  */
114
126
  PDFVersion: string;
@@ -348,6 +360,7 @@ export interface WebTwainIO extends WebTwainUtil {
348
360
  errorString: string) => void
349
361
  ): void;
350
362
  /**
363
+ * @deprecated since version 10.1. This function will be removed in future versions. Use `HTTPDownload` or `HTTPDownloadEx` instead.
351
364
  * Download the specified file via a HTTP Post request.
352
365
  * @param host The HTTP Host.
353
366
  * @param path Specify the path of the file to download.
@@ -432,6 +445,7 @@ export interface WebTwainIO extends WebTwainUtil {
432
445
  response: string) => void
433
446
  ): void;
434
447
  /**
448
+ * @deprecated since version 10.1. This property will be removed in future versions.
435
449
  * Upload the specified image via a HTTP Put request.
436
450
  * @param host The HTTP Host.
437
451
  * @param index Specify the image.
@@ -685,7 +699,8 @@ export interface WebTwainIO extends WebTwainUtil {
685
699
  errorString: string) => void
686
700
  ): void | boolean;
687
701
  /**
688
- * [Deprecation] Return or set how many threads can be used when you upload files through POST.
702
+ * @deprecated since version 16.1.1. This property will be removed in future versions.
703
+ * Return or set how many threads can be used when you upload files through POST.
689
704
  */
690
705
  MaxInternetTransferThreads: number;
691
706
  /**
@@ -832,14 +847,14 @@ export interface WebTwainIO extends WebTwainUtil {
832
847
  errorString: string) => void
833
848
  ): void | boolean;
834
849
  /**
835
- * [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
836
- * [Alternative] Read SelectedImagesIndices instead.
850
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use `SelectedImagesIndices` instead.
851
+ * Return an index from the selected indices array.
837
852
  * @param indexOfIndices Specify the index of the specified image.
838
853
  */
839
854
  SaveSelectedImagesToBase64Binary(indexOfIndices: number): number;
840
855
  /**
841
- * [Deprecation] Saves the selected images in the buffer to a base64 string.
842
- * [Alternative] Use ConvertToBase64 instead.
856
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use `ConvertToBase64` instead.
857
+ * Saves the selected images in the buffer to a base64 string.
843
858
  * @param successCallback A callback function that is executed if the request succeeds.
844
859
  * @param failureCallback A callback function that is executed if the request fails.
845
860
  * @argument result The resulting array of strings.
@@ -921,7 +936,8 @@ export interface WebTwainIO extends WebTwainUtil {
921
936
  flag: number
922
937
  ): boolean;
923
938
  /**
924
- * [Deprecation] Set a cookie string into the Http Header to be used when uploading scanned images through POST.
939
+ * @deprecated since version 16.1.1. This property will be removed in future versions.
940
+ * Set a cookie string into the Http Header to be used when uploading scanned images through POST.
925
941
  * @param cookie The cookie.
926
942
  */
927
943
  SetCookie(cookie: string): boolean;
@@ -932,6 +948,24 @@ export interface WebTwainIO extends WebTwainUtil {
932
948
  * @param type The format of the file.
933
949
  */
934
950
  ShareImages(fileName: string, indices: number[], type: DynamsoftEnumsDWT.EnumDWT_ImageType):Promise<void>;
951
+ /**
952
+ * Copy selected area to Blob or base64.
953
+ * @param index Image to be copied from.
954
+ * @param area Area of image to be copied. X,Y is top left corner origin, width and height is size of area to be copied.
955
+ * @param type The target image type of the blob/base64.
956
+ * @param imageFormatType Specify if the return should be Blob or base64 string. Only support blob or base64
957
+ */
958
+ OutputSelectedAreaAsync(
959
+ index: number,
960
+ area: {
961
+ x: number,
962
+ y: number,
963
+ width: number,
964
+ height: number
965
+ },
966
+ type: DynamsoftEnumsDWT.EnumDWT_ImageType | number,
967
+ imageFormatType: DynamsoftEnumsDWT.EnumDWT_ImageFormatType | number,
968
+ ): Promise < Blob|string > ;
935
969
  }
936
970
  export interface Base64Result {
937
971
  /**
@@ -22,6 +22,7 @@ export interface WebTwainUtil {
22
22
  */
23
23
  readonly ProductFamily: string;
24
24
  /**
25
+ * @deprecated since version 18.0. This property will be removed in future versions. Use `Dynamsoft.DWT.ProductKey` instead.
25
26
  * Return or set the ProductKey.
26
27
  */
27
28
  ProductKey: string;
@@ -76,6 +77,7 @@ export interface WebTwainUtil {
76
77
  */
77
78
  readonly VersionInfo: string;
78
79
  /**
80
+ * @deprecated since version 18.0. This function will be removed in future versions. Use property `Dynamsoft.DWT.ProductKey` instead.
79
81
  * Update / set the ProductKey.
80
82
  * @param productKey the ProductKey.
81
83
  */
@@ -3,6 +3,7 @@ import { DynamsoftEnumsDWT } from "./Dynamsoft.Enum";
3
3
 
4
4
  export interface WebTwainViewer extends WebTwainAcquire {
5
5
  /**
6
+ * @deprecated since version 16.2. This function will be removed in future versions. Use `Viewer.bind` and `Viewer.show` instead.
6
7
  * Create a Dynamsoft Viewer instance and bind it to the WebTwain instance.
7
8
  * @param elementId Specify an HTML element to create the viewer.
8
9
  */
@@ -10,58 +11,72 @@ export interface WebTwainViewer extends WebTwainAcquire {
10
11
  elementId: string
11
12
  ): boolean;
12
13
  /**
14
+ * @deprecated since version 16.2. This function will be removed in future versions. Use `Viewer.unbind` instead.
13
15
  * Unbind and destroy the viewer.
14
16
  */
15
17
  UnbindViewer(): boolean;
16
18
  /**
19
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `Viewer.background` instead.
17
20
  * Return or set the background colour of the viewer.
18
21
  */
19
22
  BackgroundColor: number;
20
23
  /**
24
+ * @deprecated since version 16.2. This property will be removed in future versions. Use function `Viewer.selectedPageBorder` instead.
21
25
  * Return or set the border colour for selected image(s).
22
26
  */
23
27
  SelectionImageBorderColor: number;
24
28
  /**
29
+ * @deprecated since version 16.2. This property will be removed in future versions. Use function `Viewer.fitWindow` instead.
25
30
  * Return or set how the image is fit in the viewer.
26
31
  */
27
32
  FitWindowType: number;
28
33
  /**
34
+ * @deprecated since version 16.2. This property will be removed in future versions. Use function `Viewer.fitWindow` instead.
29
35
  * Return or set the border colour for selected image(s).
30
36
  */
31
37
  IfFitWindow: boolean;
32
38
  /**
39
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `Viewer.height` instead.
33
40
  * Return or set the height of the viewer.
34
41
  */
35
42
  Height: number | string;
36
43
  /**
44
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `Viewer.width` instead.
37
45
  * Return or set the width of the viewer.
38
46
  */
39
47
  Width: number | string;
40
48
  /**
49
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `ViewerEvent.imageX` instead.
41
50
  * Return the horizontal coordinate of the mouse.
42
51
  */
43
52
  readonly MouseX: number;
44
53
  /**
54
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `ViewerEvent.imageY` instead.
45
55
  * Return the vertical coordinate of the mouse.
46
56
  */
47
57
  readonly MouseY: number;
48
58
  /**
59
+ * @deprecated since version 16.2. This function will be removed in future versions. Use `Viewer.cursor` instead.
49
60
  * Return or set the shape of the cursor.
50
61
  */
51
62
  MouseShape: boolean;
52
63
  /**
64
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `Viewer.ifAutoScroll` instead.
53
65
  * Return or set whether the thumbnails view scrolls when new images come in.
54
66
  */
55
67
  IfAutoScroll: boolean;
56
68
  /**
69
+ * @deprecated since version 16.2. This property will be removed in future versions. Use function `Viewer.updatePageNumberStyle` instead.
57
70
  * Return or set whether to show the page numbers.
58
71
  */
59
72
  ShowPageNumber: boolean;
60
73
  /**
74
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `Viewer.pageMargin` instead.
61
75
  * Return or set the margin between images (in pixels).
62
76
  */
63
77
  ImageMargin: number;
64
78
  /**
79
+ * @deprecated since version 16.2. This property will be removed in future versions. Use `Viewer.zoom` instead.
65
80
  * Return or set the zoom factor.
66
81
  */
67
82
  Zoom: number;
@@ -131,6 +146,7 @@ export interface DynamsoftViewer {
131
146
  */
132
147
  pageMargin: number | string;
133
148
  /**
149
+ * @deprecated since version 18.4. This property will be removed in future versions. Use function `updateSelectionBoxStyle` instead.
134
150
  * [Scope] Main viewer
135
151
  * [Description] Set the border color of the selected area.
136
152
  * [Usage Notes] 'Invalid property value' is reported when the set value does not meet the CSS standard.
@@ -181,12 +197,14 @@ export interface DynamsoftViewer {
181
197
  */
182
198
  selectedPageBackground: string;
183
199
  /**
200
+ * @deprecated since version 17.3. This property will be removed in future versions. Use function `updatePageNumberStyle` instead.
184
201
  * [Scope] Main viewer
185
202
  * [Description] Whether to show the page number. The default value is false.
186
203
  * [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
187
204
  */
188
205
  showPageNumber: boolean;
189
206
  /**
207
+ * @deprecated since version 17.3. This property will be removed in future versions. Use function `updateCheckboxStyle` instead.
190
208
  * [Scope] Main viewer
191
209
  * [Description] Whether to show the checkbox for multiple selected. The default value is false.
192
210
  * [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
@@ -207,6 +225,13 @@ export interface DynamsoftViewer {
207
225
  * [Description] Set whether to allow page dragging to reorder the pages.
208
226
  */
209
227
  allowPageDragging?: boolean;
228
+ /**
229
+ * Set the zoom origin.
230
+ */
231
+ zoomOrigin?: { //18.3
232
+ x: string; //Default is "center", values: "left", "right", "center".
233
+ y: string; //Default is "center", values: "top", "bottom", "center"
234
+ }
210
235
  /**
211
236
  * [Scope] Main viewer
212
237
  * [Description] Return the index of the next image of the currently selected image.
@@ -279,31 +304,37 @@ export interface DynamsoftViewer {
279
304
  * [Scope] Main viewer
280
305
  * [Description] Clear the selected area(s) on the current image.
281
306
  */
282
- clearSelectedAreas(): void;
307
+ clearSelectedAreas(): boolean;
283
308
  /**
284
309
  * [Scope] Main viewer
285
310
  * [Description] Set one or more rectangular area(s) on the specified image.
286
311
  * @param areas Specify the areas.
287
312
  */
288
- setSelectedAreas(areas: Area[]): void;
313
+ setSelectedAreas(areas: Area[]): boolean;
289
314
  /**
290
315
  * [Scope] Main viewer
291
316
  * [Description] Fit the image to the window
292
317
  * @param type Specify a type to fit. (width, height, both)
293
318
  */
294
- fitWindow(type?: 'height' | 'width'): void;
319
+ fitWindow(type?: 'height' | 'width'): boolean;
295
320
  /**
296
321
  * [Scope] Main viewer
297
322
  * Update checkbox style
298
323
  * @argument checkboxSettings Settings for checkboxex.
299
324
  */
300
- updateCheckboxStyle(checkboxSettings?: CheckboxSettings): void;
325
+ updateCheckboxStyle(checkboxSettings?: CheckboxSettings): boolean;
301
326
  /**
302
327
  * [Scope] Main viewer
303
328
  * Update page number style
304
329
  * @argument pageNumberSettings Settings for page numbers.
305
330
  */
306
- updatePageNumberStyle(pageNumberSettings?: PageNumberSettings): void;
331
+ updatePageNumberStyle(pageNumberSettings?: PageNumberSettings): boolean;
332
+ /**
333
+ * [Scope] Main viewer
334
+ * Sets the graphical style for the selection box in the Viewer.
335
+ * @argument selectionBoxStyleSettings Settings for selection box.
336
+ */
337
+ updateSelectionBoxStyle(selectionBoxStyleSettings?: SelectionBoxStyleSettings): boolean;
307
338
  /**
308
339
  * [Description] Set the CSS class name of the specified button defined in updateUISetting.
309
340
  * @param name Specify the button.
@@ -423,6 +454,13 @@ export interface EditorSettings {
423
454
  */
424
455
  dialogText?: any;
425
456
  workMode?: number | DynamsoftEnumsDWT.EnumDWT_WorkMode;//default is normal value:normal=0, balance=1,
457
+ /**
458
+ * Set the zoom origin.
459
+ */
460
+ zoomOrigin?: { //18.3
461
+ x: string; //Default is "center", values: "left", "right", "center".
462
+ y: string; //Default is "center", values: "top", "bottom", "center"
463
+ }
426
464
  }
427
465
  export interface ThumbnailViewerSettings {
428
466
  /**
@@ -499,12 +537,14 @@ export interface ThumbnailViewerSettings {
499
537
  */
500
538
  allowResizing?: boolean;
501
539
  /**
540
+ * @deprecated since version 17.3. This property will be removed in future versions. Use `pageNumber` instead.
502
541
  * [Scope] Thumbnail viewer
503
542
  * [Description] Whether to show the page number. The default value is false.
504
543
  * [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
505
544
  */
506
545
  showPageNumber?: boolean;
507
546
  /**
547
+ * @deprecated since version 17.3. This property will be removed in future versions. Use `checkbox` instead.
508
548
  * [Scope] Thumbnail viewer
509
549
  * [Description] Whether to show the checkbox for multiple selected. The default value is false.
510
550
  * [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
@@ -607,6 +647,19 @@ export interface ImageEditor {
607
647
  * [Description] Update the changes in the ImageEditor to the server.
608
648
  */
609
649
  save():Promise<void>;
650
+ /**
651
+ * Set the zoom origin.
652
+ */
653
+ zoomOrigin?: {
654
+ x: string; //Default is "center", values: "left", "right", "center".
655
+ y: string; //Default is "center", values: "top", "bottom", "center"
656
+ };
657
+ /**
658
+ * [Scope] ImageEditor viewer
659
+ * Set the selction box styling.
660
+ * @argument selectionBoxStyleSettings Settings for selection box.
661
+ */
662
+ updateSelectionBoxStyle(selectionBoxStyleSettings?: SelectionBoxStyleSettings): boolean;
610
663
  }
611
664
  export interface ThumbnailViewer {
612
665
  /**
@@ -713,12 +766,14 @@ export interface ThumbnailViewer {
713
766
  */
714
767
  allowResizing: boolean;
715
768
  /**
769
+ * @deprecated since version 17.3. This property will be removed in future versions. Use function `updatePageNumberStyle` instead.
716
770
  * [Scope] Thumbnail viewer
717
771
  * [Description] Whether to show the page number. The default value is false.
718
772
  * [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
719
773
  */
720
774
  showPageNumber: boolean;
721
775
  /**
776
+ * @deprecated since version 17.3. This property will be removed in future versions. Use function `updateCheckboxStyle` instead.
722
777
  * [Scope] Thumbnail viewer
723
778
  * [Description] Whether to show the checkbox for multiple selected. The default value is false.
724
779
  * [Usage Notes] 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly.
@@ -883,3 +938,11 @@ export interface PageNumberSettings {
883
938
  translateX?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to itself
884
939
  translateY?: number | string; //default: "", number unit: px, string value: "10px"/"10%", relative to itself
885
940
  }
941
+ export interface SelectionBoxStyleSettings {
942
+ borderColor?: string; //Default: rgba(0,0,0,1). Colour in "rgba(r, g, b, a)"
943
+ borderWidth?: number; //Default: 1. Pixels. Width of individual pattern segments.
944
+ lineDash?: [number,number]; //Default: [5,2]. Pixels. Line spacing where x is shaded pixels and y is gap in pixels.
945
+ handleWidth?: number; //Default: 9. Pixels.
946
+ handleHeight?: number; //Default: 9. Pixels
947
+ handleColor?: string; //Default: rgba(0,0,0,1). Colour in "rgba(r, g, b, a)"
948
+ }
@@ -12,19 +12,23 @@ export interface WebTwain extends WebTwainViewer {
12
12
  */
13
13
  Addon: Addon;
14
14
  /**
15
- * [Deprecation] This API is no longer needed.
15
+ * @deprecated since version 10.1. This property will be removed in future versions.
16
+ * This API is no longer needed.
16
17
  */
17
18
  AllowMultiSelect: boolean;
18
19
  /**
19
- * [Deprecation] This API is no longer needed.
20
+ * @deprecated since version 10.1. This property will be removed in future versions.
21
+ * This API is no longer needed.
20
22
  */
21
23
  AllowPluginAuthentication: boolean;
22
24
  /**
23
- * [Deprecation] This API is no longer needed.
25
+ * @deprecated since version 10.1. This property will be removed in future versions.
26
+ * This API is no longer needed.
24
27
  */
25
28
  AsyncMode: boolean;
26
29
  /**
27
- * [Deprecation] This API is no longer needed.
30
+ * @deprecated since version 10.1. This property will be removed in future versions.
31
+ * This API is no longer needed.
28
32
  */
29
33
  BorderStyle: DynamsoftEnumsDWT.EnumDWT_BorderStyle | number;
30
34
  /**
@@ -32,11 +36,13 @@ export interface WebTwain extends WebTwainViewer {
32
36
  */
33
37
  readonly bReady: boolean;
34
38
  /**
35
- * [Deprecation] This API is no longer needed.
39
+ * @deprecated since version 10.1. This property will be removed in future versions.
40
+ * This API is no longer needed.
36
41
  */
37
42
  BrokerProcessType: number;
38
43
  /**
39
- * [Deprecation] This API is no longer needed.
44
+ * @deprecated since version 10.1. This property will be removed in future versions.
45
+ * This API is no longer needed.
40
46
  */
41
47
  EnableInteractiveZoom: boolean;
42
48
  }
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * Copyright 2022, Dynamsoft Corporation
15
15
  * Author: Dynamsoft Support Team
16
- * Version: 18.2
16
+ * Version: 18.3
17
17
  */
18
18
  import Dynamsoft from "./Dynamsoft";
19
19
  export default Dynamsoft;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dwt",
3
- "version": "18.2.1",
3
+ "version": "18.4.0",
4
4
  "author": {
5
5
  "name": "Dynamsoft",
6
6
  "url": "https://www.dynamsoft.com"