dwt 18.3.0 → 18.4.1

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.
@@ -19,6 +19,7 @@ export interface PDF {
19
19
  ) => void
20
20
  ): void;
21
21
  /**
22
+ * @deprecated since version 18.4. This function will be removed in future versions. Use `GetReaderOptions` instead.
22
23
  * Return the convert mode.
23
24
  */
24
25
  GetConvertMode(): number;
@@ -32,16 +33,19 @@ export interface PDF {
32
33
  */
33
34
  IsTextBasedPDF(path: string): boolean;
34
35
  /**
36
+ * @deprecated since version 18.4. This function will be removed in future versions. Use `SetReaderOptions` instead.
35
37
  * Set the convert mode.
36
38
  * @param mode Specify the mode.
37
39
  */
38
40
  SetConvertMode(mode: DynamsoftEnumsDWT.EnumDWT_ConvertMode | number): boolean;
39
41
  /**
42
+ * @deprecated since version 18.4. This function will be removed in future versions. Use `SetReaderOptions` instead.
40
43
  * Set the password for reading encrypted PDF files.
41
44
  * @param password Specify the password.
42
45
  */
43
46
  SetPassword(password: string): boolean;
44
47
  /**
48
+ * @deprecated since version 18.4. This function will be removed in future versions. Use `SetReaderOptions` instead.
45
49
  * Set the resolution for rasterizing.
46
50
  * @param resolution Specify the resolution.
47
51
  */
@@ -50,6 +54,16 @@ export interface PDF {
50
54
  * Set up the PDF writing engine.
51
55
  */
52
56
  Write: Write;
57
+ /**
58
+ * Set the PDF reader Options.
59
+ * @param options Specify the reader Options.
60
+ */
61
+ SetReaderOptions(options: ReaderOptions): boolean;
62
+ /**
63
+ * Returns the current PDF reader options.
64
+ * @param options Specify the reader Options.
65
+ */
66
+ GetReaderOptions(): ReaderOptions;
53
67
  }
54
68
  export interface Write {
55
69
  /**
@@ -138,3 +152,36 @@ export interface PDFWSettings {
138
152
  compressLevel?: number;
139
153
  }
140
154
  }
155
+ export interface ReaderOptions {
156
+ /**
157
+ * Default value: CM_AUTO
158
+ */
159
+ convertMode: DynamsoftEnumsDWT.EnumDWT_ConvertMode | number;
160
+ /**
161
+ * If a password is required to open the PDF, set it here. Default value: "".
162
+ */
163
+ password?: string;
164
+ renderOptions?: {
165
+ /**
166
+ * If convertMode is set to CM_RENDERALL or CM_AUTO, this controls whether or not annotations will be rendered. Default value: false.
167
+ */
168
+ renderAnnotations?: boolean;
169
+ /**
170
+ * DPI. Only affects text being rasterized. Does not affect images extracted from the PDF file. Default value: 200.
171
+ */
172
+ resolution?: number;
173
+ /**
174
+ * Pixels. 0 is no limit. Default value: 0.
175
+ */
176
+ maxWidth?: number;
177
+ /**
178
+ * Pixels. 0 is no limit. Default value: 0.
179
+ */
180
+ maxHeight?: number;
181
+ /**
182
+ * Whether or not to render in grayscale. Default value: false.
183
+ */
184
+ renderGrayscale?: boolean;
185
+ }
186
+
187
+ }
@@ -181,6 +181,9 @@ export namespace DynamsoftEnumsDWT {
181
181
  CM_RENDERALL = 1,
182
182
  CM_IMAGEONLY = 2,
183
183
  CM_AUTO = 3,
184
+ /*
185
+ * @deprecated since version 18.4. This value will be removed in future versions. Use `ReaderOptions.renderOptions.renderAnnotations` instead.
186
+ */
184
187
  CM_RENDERALLWITHANNOTATION = 4
185
188
  }
186
189
  enum EnumErrorCode {
@@ -1875,19 +1878,22 @@ export namespace DynamsoftEnumsDWT {
1875
1878
  SANESCANNER = 0x100,
1876
1879
  ESCLSCANNER = 0x200,
1877
1880
  WIFIDIRECTSCANNER = 0x400,
1881
+ /*
1882
+ * @deprecated since version 18.2. This value will be removed in future versions. Use the value `WIASCANNER` instead.
1883
+ */
1878
1884
  WIATWAINSCANNER = 0x800
1879
1885
  }
1880
1886
  enum EnumDWT_ImageFormatType{
1881
- url = 0,
1882
- blob = 1,
1883
- base64 = 2
1887
+ URL = 0,
1888
+ Blob = 1,
1889
+ Base64 = 2
1884
1890
  }
1885
1891
  enum EnumDWT_ResponseType{
1886
- text = 0,
1887
- blob = 1,
1888
- arraybuffer = 2,
1889
- xml = 3,
1890
- json = 4
1892
+ Text = 0,
1893
+ Blob = 1,
1894
+ ArrayBuffer = 2,
1895
+ XML = 3,
1896
+ JSON = 4
1891
1897
  }
1892
1898
  enum EnumDWT_WorkMode{
1893
1899
  normal = 0, // old mode, the image is processed at the server and then displayed in viewer
@@ -337,6 +337,10 @@ export interface DWTPro {
337
337
  * A callback function that is executed when a WebTwain instance is created.
338
338
  */
339
339
  OnWebTwainReady: () => void;
340
+ /**
341
+ * A callback function that is executed when a WebTwain instance is faild.
342
+ */
343
+ OnWebTwainError: (error: any) => void;
340
344
  /**
341
345
  * A callback function that is executed right before the creation of a WebTwain instance.
342
346
  */
@@ -354,12 +358,28 @@ export interface DWTPro {
354
358
  */
355
359
  ProductKey: string;
356
360
  /**
361
+ * @deprecated since version 18.0. This property will be removed in future versions. Use `Dynamsoft.DWT.ProductKey` instead.
357
362
  * LTS Settings
358
- */
363
+ */
359
364
  licenseServer?: string[];
365
+ /**
366
+ * @deprecated since version 18.0. This property will be removed in future versions. Use `Dynamsoft.DWT.ProductKey` instead.
367
+ * LTS Settings
368
+ */
360
369
  handshakeCode?: string;
370
+ /**
371
+ * @deprecated since version 18.0. This property will be removed in future versions. Use `Dynamsoft.DWT.ProductKey` instead.
372
+ * LTS Settings
373
+ */
361
374
  sessionPassword?: string;
375
+ /**
376
+ * @deprecated since version 18.0. This property will be removed in future versions. Use `Dynamsoft.DWT.ProductKey` instead.
377
+ * LTS Settings
378
+ */
362
379
  organizationID?: string;
380
+ /*
381
+ * @deprecated since version 18.2. This property will be removed in future versions. Use RegisterEvent `OnWebTwainError` instead.
382
+ */
363
383
  licenseException?: string;
364
384
  /**
365
385
  * The product name.
@@ -379,6 +399,10 @@ export interface DWTPro {
379
399
  * Set or return where the library looks for resources files including service installers, CSS, etc.
380
400
  */
381
401
  ResourcesPath: string;
402
+ /**
403
+ * Set or return service installer path.
404
+ */
405
+ ServiceInstallerLocation: string;
382
406
  /**
383
407
  * The version of the Linux edition (the service, not wasm).
384
408
  */
@@ -66,6 +66,9 @@ export interface WebTwainAcquire extends WebTwainEdit {
66
66
  * Load a data source to get it ready to acquire images.
67
67
  */
68
68
  OpenSourceAsync(): Promise<boolean>;
69
+ /*
70
+ * @deprecated since version 10.1. This function will be removed in future versions. Use `GetSourceNamesAsync` instead.
71
+ */
69
72
  GetSourceNames(bIncludeDetails?: boolean): string[] | SourceDetails[];
70
73
  /**
71
74
  * Return all available data sources (scanners, etc.) and optionally all detailed information about them.
@@ -155,6 +158,7 @@ export interface WebTwainAcquire extends WebTwainEdit {
155
158
  */
156
159
  GetCustomDSDataEx(): string;
157
160
  /**
161
+ * @deprecated since version 18.0. This function will be removed in future versions.
158
162
  * Inspect the current data source and return whether it is a scanner, a webcam, etc.
159
163
  */
160
164
  GetDeviceType(): number;
@@ -350,6 +354,7 @@ export interface WebTwainAcquire extends WebTwainEdit {
350
354
  */
351
355
  readonly ImageLayoutPageNumber: number;
352
356
  /**
357
+ * @deprecated since version 10.1. This property will be removed in future versions. Use `RegisterEvent("OnPostTransferAsync", function (outputInfo: OutputInfo) {})` and get `outputInfo` instead.
353
358
  * Return the bit depth of the current image.
354
359
  */
355
360
  readonly ImageBitsPerPixel: number;
@@ -358,18 +363,22 @@ export interface WebTwainAcquire extends WebTwainEdit {
358
363
  */
359
364
  readonly ImagePixelType: DynamsoftEnumsDWT.EnumDWT_PixelType | number;
360
365
  /**
366
+ * @deprecated since version 10.1. This property will be removed in future versions. Use `RegisterEvent("OnPostTransferAsync", function (outputInfo: OutputInfo) {})` and get `outputInfo` instead.
361
367
  * Return the length of the current image.
362
368
  */
363
369
  readonly ImageLength: number;
364
370
  /**
371
+ * @deprecated since version 10.1. This property will be removed in future versions. Use `RegisterEvent("OnPostTransferAsync", function (outputInfo: OutputInfo) {})` and get `outputInfo` instead.
365
372
  * Return the width of the current image.
366
373
  */
367
374
  readonly ImageWidth: number;
368
375
  /**
376
+ * @deprecated since version 10.1. This property will be removed in future versions. Use `RegisterEvent("OnPostTransferAsync", function (outputInfo: OutputInfo) {})` and get `outputInfo` instead.
369
377
  * Return the horizontal resolution of the current image.
370
378
  */
371
379
  readonly ImageXResolution: number;
372
380
  /**
381
+ * @deprecated since version 10.1. This property will be removed in future versions. Use `RegisterEvent("OnPostTransferAsync", function (outputInfo: OutputInfo) {})` and get `outputInfo` instead.
373
382
  * Return the vertical resolution of the current image.
374
383
  */
375
384
  readonly ImageYResolution: number;
@@ -429,169 +438,170 @@ export interface WebTwainAcquire extends WebTwainEdit {
429
438
  failureCallback: (capabilities: Capabilities) => void
430
439
  ): void;
431
440
  /**
432
- * [Deprecation] Specifies the capabiltiy to be negotiated. This is a runtime property.
433
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
441
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
442
+ * Specifies the capabiltiy to be negotiated. This is a runtime property.
434
443
  */
435
444
  Capability: DynamsoftEnumsDWT.EnumDWT_Cap;
436
445
  /**
437
- * [Deprecation] Return or set the index (0-based) of
446
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
447
+ * Return or set the index (0-based) of
438
448
  * a list to indicate the Current Value when the value of
439
449
  * the CapType property is TWON_ENUMERATION. If the data type
440
450
  * of the capability is String, the list is in CapItemsString property.
441
451
  * For other data types, the list is in CapItems property. This is a runtime property.
442
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
443
452
  */
444
453
  CapCurrentIndex: number;
445
454
  /**
446
- * [Deprecation] Return or set the current value in a range when the
455
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
456
+ * Return or set the current value in a range when the
447
457
  * value of the CapType property is TWON_RANGE. This is a runtime property.
448
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
449
458
  */
450
459
  CapCurrentValue: number;
451
460
  /**
452
- * [Deprecation] Return the index (0-based) of a list to indicate the
461
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
462
+ * Return the index (0-based) of a list to indicate the
453
463
  * Default Value when the value of the CapType property is TWON_ENUMERATION.
454
464
  * If the data type of the capability is String, the list is in CapItemsString property.
455
465
  * For other data types, the list is in CapItems property. This is a runtime, read-only property.
456
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
457
466
  */
458
467
  readonly CapDefaultIndex: number;
459
468
  /**
460
- * [Deprecation] Return the default value in a range when the value of the
469
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
470
+ * Return the default value in a range when the value of the
461
471
  * CapType property is TWON_RANGE. This is a runtime, read-only property.
462
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
463
472
  */
464
473
  CapDefaultValue: number;
465
474
  /**
466
- * [Deprecation] Retruns the description for a capability
467
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
475
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
476
+ * Retruns the description for a capability
468
477
  */
469
478
  CapDescription: string;
470
479
  /**
471
- * [Deprecation] Return or set the maximum value in a range when the
480
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
481
+ * Return or set the maximum value in a range when the
472
482
  * value of the CapType property is TWON_RANGE. This is a runtime property.
473
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
474
483
  */
475
484
  CapMaxValue: number;
476
485
  /**
477
- * [Deprecation] Return or set the minimum value in a range when the
486
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
487
+ * Return or set the minimum value in a range when the
478
488
  * value of the CapType property is TWON_RANGE. This is a runtime property.
479
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
480
489
  */
481
490
  CapMinValue: number;
482
491
  /**
483
- * [Deprecation] Return or set how many items are in the list when the
492
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
493
+ * Return or set how many items are in the list when the
484
494
  * value of the CapType property is TWON_ARRAY or TWON_ENUMERATION.
485
495
  * For String data type, the list is in CapItemsString property.
486
496
  * For other data types, the list is in CapItems property.
487
497
  * This is a runtime property.
488
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
489
498
  */
490
499
  CapNumItems: number;
491
500
  /**
492
- * [Deprecation] Return or set the step size in a range when the value
501
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
502
+ * Return or set the step size in a range when the value
493
503
  * of the CapType property is TWON_RANGE. This is a runtime property.
494
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
495
504
  */
496
505
  CapStepSize: number;
497
506
  /**
498
- * [Deprecation] Return or set the type of capability container used
507
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
508
+ * Return or set the type of capability container used
499
509
  * to exchange capability information between application and source.
500
510
  * This is a runtime property.
501
511
  */
502
512
  CapType: DynamsoftEnumsDWT.EnumDWT_CapType;
503
513
  /**
504
- * [Deprecation] Return or set the value of the capability specified by
514
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
515
+ * Return or set the value of the capability specified by
505
516
  * Capability property when the value of the CapType property is TWON_ONEVALUE.
506
517
  * This is a runtime property.
507
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
508
518
  */
509
519
  CapValue: number;
510
520
  /**
511
- * [Deprecation] Return or set the string value for a capability when the
521
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
522
+ * Return or set the string value for a capability when the
512
523
  * value of the CapType property is TWON_ONEVALUE. This is a runtime property.
513
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
514
524
  */
515
525
  CapValueString: string;
516
526
  /**
517
- * [Deprecation] Return or set the value type for reading the value of a capability.
518
- * This is a runtime property.
519
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
527
+ * @deprecated since version 16.1.1. This property will be removed in future versions. Use function `getCapabilities` and `setCapabilities` instead.
528
+ * Return or set the value type for reading the value of a capability.
529
+ * This is a runtime property.
520
530
  */
521
531
  CapValueType: number;
522
532
  /**
523
- * [Deprecation] Gets information of the capability specified by the Capability property.
524
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
533
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
534
+ * Gets information of the capability specified by the Capability property.
525
535
  */
526
536
  CapGet(): boolean;
527
537
  /**
528
- * [Deprecation] Return the Source's current Value for the specified capability.
529
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
538
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
539
+ * Return the Source's current Value for the specified capability.
530
540
  */
531
541
  CapGetCurrent(): boolean;
532
542
  /**
533
- * [Deprecation] Return the Source's Default Value for the specified capability.
543
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
544
+ * Return the Source's Default Value for the specified capability.
534
545
  * This is the Source's preferred default value.
535
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
536
546
  */
537
547
  CapGetDefault(): boolean;
538
548
  /**
539
- * [Deprecation] Return the value of the bottom-most edge of the specified frame.
540
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
549
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
550
+ * Return the value of the bottom-most edge of the specified frame.
541
551
  * @param index specifies the value of which frame to get. The index is 0-based.
542
552
  */
543
553
  CapGetFrameBottom(index: number): number;
544
554
  /**
545
- * [Deprecation] Return the value (in Unit) of the left-most edge of the specified frame.
546
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
555
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
556
+ * Return the value (in Unit) of the left-most edge of the specified frame.
547
557
  * @param index specifies the value of which frame to get. The index is 0-based.
548
558
  */
549
559
  CapGetFrameLeft(index: number): number;
550
560
  /**
551
- * [Deprecation] Return the value (in Unit) of the left-most edge of the specified frame.
552
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
561
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
562
+ * Return the value (in Unit) of the left-most edge of the specified frame.
553
563
  * @param index specifies the value of which frame to get. The index is 0-based.
554
564
  */
555
565
  CapGetFrameRight(index: number): number;
556
566
  /**
557
- * [Deprecation] Return the value (in Unit) of the top-most edge of the specified frame.
558
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
567
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
568
+ * Return the value (in Unit) of the top-most edge of the specified frame.
559
569
  * @param index specifies the value of which frame to get. The index is 0-based.
560
570
  */
561
571
  CapGetFrameTop(index: number): number;
562
572
  /**
563
- * [Deprecation] Use getCapabilities() and setCapabilities() instead.
573
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
564
574
  */
565
575
  CapGetHelp(index: number): number;
566
576
  /**
567
- * [Deprecation] Use getCapabilities() and setCapabilities() instead.
577
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
568
578
  */
569
579
  CapGetLabel(index: number): number;
570
580
  /**
571
- * [Deprecation] Use getCapabilities() and setCapabilities() instead.
581
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
572
582
  */
573
583
  CapGetLabels(index: number): number;
574
584
  /**
575
- * [Deprecation] Queries whether the Source supports a particular operation on the capability.
576
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
585
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
586
+ * Queries whether the Source supports a particular operation on the capability.
577
587
  * @param {DynamsoftEnumsDWT.EnumDWT_MessageType} messageType specifies the type of capability operation.
578
588
  */
579
589
  CapIfSupported(messageType: DynamsoftEnumsDWT.EnumDWT_MessageType): boolean;
580
590
  /**
581
- * [Deprecation] Changes the Current Value of the capability specified by
591
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
592
+ * Changes the Current Value of the capability specified by
582
593
  * Capability property back to its power-on value.
583
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
584
594
  */
585
595
  CapReset(): boolean;
586
596
  /**
587
- * [Deprecation] Sets the current capability using the container type specified by
597
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
598
+ * Sets the current capability using the container type specified by
588
599
  * CapType property. The current capability is specified by Capability property.
589
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
590
600
  */
591
601
  CapSet(): boolean;
592
602
  /**
593
- * [Deprecation] Sets the values of the specified frame.
594
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
603
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
604
+ * Sets the values of the specified frame.
595
605
  * @param index specifies the values of which frame to set. The index is 0-based.
596
606
  * @param left the value (in Unit) of the left-most edge of the specified frame.
597
607
  * @param top the value (in Unit) of the top-most edge of the specified frame.
@@ -600,29 +610,30 @@ export interface WebTwainAcquire extends WebTwainEdit {
600
610
  */
601
611
  CapSetFrame(index: number, left: number, top: number, right: number, bottom: number): boolean;
602
612
  /**
613
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
603
614
  * Get the cap item value of the capability specified by Capability property,
604
615
  * when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION.
605
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
606
616
  * @param index Index is 0-based. It is the index of the cap item.
607
617
  */
608
618
  GetCapItems(index: number): number;
609
619
  /**
620
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
610
621
  * Returns the cap item value of the capability specified by Capability property,
611
622
  * when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION.
612
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
613
623
  * @param index Index is 0-based. It is the index of the cap item.
614
624
  */
615
625
  GetCapItemsString(index: number): string;
616
626
  /**
617
- * [Deprecation] Set the value of the specified cap item.
627
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
628
+ * Set the value of the specified cap item.
618
629
  * @param index Index is 0-based. It is the index of the cap item.
619
630
  * @param newVal For string type, please use CapItemsstring property.
620
631
  */
621
632
  SetCapItems(index: number, newVal: number): void;
622
633
  /**
623
- * [Deprecation] Set the cap item value of the capability specified by Capability property,
634
+ * @deprecated since version 16.1.1. This function will be removed in future versions. Use `getCapabilities` and `setCapabilities` instead.
635
+ * Set the cap item value of the capability specified by Capability property,
624
636
  * when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION.
625
- * [Alternative] Use getCapabilities() and setCapabilities() instead.
626
637
  * @param index Index is 0-based. It is the index of the cap item.
627
638
  * @param newVal The new value to be set.
628
639
  */
@@ -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 {