dwt 16.2.4 → 16.2.6

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 (37) hide show
  1. package/README.md +16 -12
  2. package/dist/addon/dbrjs/dbr-7.6.0.full.wasm.js +4016 -4016
  3. package/dist/addon/dbrjs/dbr-7.6.0.worker.js +107 -107
  4. package/dist/addon/dbrjs/dbr.js +10 -10
  5. package/dist/dist/DynamsoftServiceSetup.deb +0 -0
  6. package/dist/dist/DynamsoftServiceSetup.msi +0 -0
  7. package/dist/dist/DynamsoftServiceSetup.pkg +0 -0
  8. package/dist/dist/DynamsoftServiceSetup.rpm +0 -0
  9. package/dist/dist/LICENSE +95 -95
  10. package/dist/dynamsoft.webtwain.min.js +209 -209
  11. package/dist/dynamsoft.webtwain.min.mjs +208 -208
  12. package/dist/src/dynamsoft.imageio_wasm-1.6.2.js +93 -93
  13. package/dist/src/dynamsoft.webtwain.css +1045 -1045
  14. package/dist/types/Addon.BarcodeReader.d.ts +168 -168
  15. package/dist/types/Addon.Camera.d.ts +125 -125
  16. package/dist/types/Addon.OCR.d.ts +264 -264
  17. package/dist/types/Addon.OCRPro.d.ts +251 -251
  18. package/dist/types/Addon.PDF.d.ts +110 -110
  19. package/dist/types/Addon.Webcam.d.ts +257 -257
  20. package/dist/types/Dynamsoft.Enum.d.ts +1850 -1849
  21. package/dist/types/Dynamsoft.FileUploader.d.ts +130 -130
  22. package/dist/types/Dynamsoft.d.ts +495 -495
  23. package/dist/types/WebTwain.Acquire.d.ts +1059 -1059
  24. package/dist/types/WebTwain.Buffer.d.ts +259 -259
  25. package/dist/types/WebTwain.Edit.d.ts +434 -434
  26. package/dist/types/WebTwain.IO.d.ts +951 -951
  27. package/dist/types/WebTwain.Util.d.ts +102 -102
  28. package/dist/types/WebTwain.Viewer.d.ts +795 -795
  29. package/dist/types/WebTwain.d.ts +51 -51
  30. package/dist/types/index.d.ts +20 -20
  31. package/package.json +2 -2
  32. package/samples/1.AcquireImage.html +0 -69
  33. package/samples/2.CustomScan.html +0 -98
  34. package/samples/3.PDFRasterizer.html +0 -73
  35. package/samples/4.OCRADocument.html +0 -156
  36. package/samples/5.ReadBarcode.html +0 -231
  37. package/samples/6.ScanOrCapture.html +0 -189
@@ -1,251 +1,251 @@
1
- import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
2
-
3
- export interface OCRPro {
4
- /**
5
- * Download and install the OCR Professional add-on on the local system.
6
- * @param path The URL to download the add-on (typically a ZIP file).
7
- * @param successCallback A callback function that is executed if the request succeeds.
8
- * @param failureCallback A callback function that is executed if the request fails.
9
- * @argument errorCode The error code.
10
- * @argument errorString The error string.
11
- */
12
- Download(
13
- path: string,
14
- successCallback: () => void,
15
- failureCallback: (
16
- errorCode: number,
17
- errorString: string
18
- ) => void
19
- ): void;
20
- /**
21
- * Return whether the OCR Professional engine has been installed.
22
- */
23
- IsModuleInstalled(): boolean;
24
- /**
25
- * Perform OCR on the specified image in the buffer.
26
- * @param index Specify the image.
27
- * @param successCallback A callback function that is executed if the request succeeds.
28
- * @param failureCallback A callback function that is executed if the request fails.
29
- * @argument imageId The imageId of the image which can be used to find the index.
30
- * @argument result The OCR result.
31
- * @argument errorCode The error code.
32
- * @argument errorString The error string.
33
- */
34
- Recognize(
35
- index: number,
36
- successCallback: (
37
- imageId: number,
38
- result: OCRProResult
39
- ) => void,
40
- failureCallback: (
41
- errorCode: number,
42
- errorString: string
43
- ) => void
44
- ): void;
45
- /**
46
- * Perform OCR on the specified local file.
47
- * @param path Specify a local file.
48
- * @param successCallback A callback function that is executed if the request succeeds.
49
- * @param failureCallback A callback function that is executed if the request fails.
50
- * @argument path The file path.
51
- * @argument result The OCR result.
52
- * @argument errorCode The error code.
53
- * @argument errorString The error string.
54
- */
55
- RecognizeFile(path: string,
56
- successCallback: (
57
- path: string,
58
- result: OCRProResult
59
- ) => void,
60
- failureCallback: (
61
- errorCode: number,
62
- errorString: string
63
- ) => void
64
- ): void;
65
- /**
66
- * Perform OCR on the specified rectangular area(s) on the image.
67
- * @param index Specify the image.
68
- * @param aryRects Specify the rectangle(s).
69
- * @param successCallback A callback function that is executed if the request succeeds.
70
- * @param failureCallback A callback function that is executed if the request fails.
71
- * @argument imageId The imageId of the image which can be used to find the index.
72
- * @argument result The OCR result.
73
- * @argument errorCode The error code.
74
- * @argument errorString The error string.
75
- */
76
- RecognizeRect(
77
- index: number,
78
- aryRects: Rect[],
79
- successCallback: (
80
- imageId: number,
81
- aryRects: Rect[],
82
- result: OCRProResult
83
- ) => void,
84
- failureCallback: (
85
- errorCode: number,
86
- errorString: string
87
- ) => void
88
- ): void;
89
- /**
90
- * Perform OCR on the selected images in the buffer.
91
- * @param index Specify the image.
92
- * @param successCallback A callback function that is executed if the request succeeds.
93
- * @param failureCallback A callback function that is executed if the request fails.
94
- * @argument result The OCR result.
95
- * @argument errorCode The error code.
96
- * @argument errorString The error string.
97
- */
98
- RecognizeSelectedImages(
99
- successCallback: (
100
- result: OCRProResult
101
- ) => void,
102
- failureCallback: (
103
- errorCode: number,
104
- errorString: string
105
- ) => void
106
- ): void;
107
- /**
108
- * Return or set the current settings of the OCR engine.
109
- */
110
- Settings: Settings | boolean | null;
111
- }
112
- export interface Rect {
113
- left: number;
114
- right: number;
115
- top: number;
116
- bottom: number;
117
- }
118
- export interface OCRProResult {
119
- /**
120
- * Return a base64 string that contains the result of the OCR.
121
- */
122
- Get(): string;
123
- /**
124
- * Return the error code.
125
- */
126
- GetErrorCode(): number;
127
- /**
128
- * Return an array which contains detailed error information for each page that was OCR'd
129
- */
130
- GetErrorDetailList(): Error[];
131
- /**
132
- * Return the error string.
133
- */
134
- GetErrorString(): string;
135
- /**
136
- * Return the source information. It could be the index of the OCR'd image or the path of the OCR'd file.
137
- */
138
- GetInput(): number | string;
139
- /**
140
- * Return the number of pages already OCR'd on the machine.
141
- */
142
- GetAlreadyOCRCount(): string;
143
- /**
144
- * Return the number of pages allowed by the current license.
145
- */
146
- GetOCRTotalCount(): string;
147
- /**
148
- * Return the number of pages in the OCR result.
149
- */
150
- GetPageCount(): string;
151
- /**
152
- * Return the content of a page.
153
- * @param index Specify the page
154
- */
155
- GetPageContent(index: number): Page;
156
- /**
157
- * Save the OCR result as a file.
158
- * @param path The path to save the file.
159
- */
160
- Save(path: string): boolean;
161
- }
162
- export interface Error {
163
- /**
164
- * Return the index of the image or path of the file.
165
- */
166
- GetInput(): number | string;
167
- /**
168
- * Return the error message.
169
- */
170
- GetMessage(): string;
171
- /**
172
- * Return the number of the page on which the error was thrown.
173
- * If the input is a file, this returns the index of the page in that file.
174
- * If the input is an image in the buffer, this always returns 0.
175
- */
176
- GetPage(): number;
177
- }
178
- export interface Page {
179
- /**
180
- * Return the number of letters in the page.
181
- */
182
- GetLetterCount(): number;
183
- /**
184
- * Return the content of the specified letter.
185
- * @index Specify the letter.
186
- */
187
- GetLetterContent(index: number): Letter;
188
- /**
189
- * Return the number of recognized rectangles in the page.
190
- */
191
- GetZoneCount(): number;
192
- /**
193
- * Return the base64-encoded content of the specified rectangle.
194
- * @index Specify the line.
195
- */
196
- GetZoneContent(index: number): string;
197
- }
198
- export interface Letter {
199
- /**
200
- * Return the text of the letter.
201
- */
202
- GetText(): number;
203
- /**
204
- * Return the coordinates for the rectangle that contains the specified letter. The coordinates are in the sequence of "left,top,right,bottom" like "121,125,123,143".
205
- */
206
- GetLetterRect(): string;
207
- }
208
- export interface Settings {
209
- /**
210
- * Specify the target language.
211
- */
212
- Languages: string;
213
- /**
214
- * Specify the URL for the license checker.
215
- */
216
- LicenseChecker: string;
217
- /**
218
- * Specify the output format.
219
- */
220
- OutputFormat: Dynamsoft.EnumDWT_OCRProOutputFormat | string;
221
- /**
222
- * Specify the PDF/A version.
223
- */
224
- PDFAVersion: Dynamsoft.EnumDWT_OCRProPDFAVersion | string;
225
- /**
226
- * Specify the PDF version.
227
- */
228
- PDFVersion: Dynamsoft.EnumDWT_OCRProPDFVersion | string;
229
- /**
230
- * Specify the recognition module.
231
- */
232
- RecognitionModule: Dynamsoft.EnumDWT_OCRProRecognitionModule | string;
233
- /**
234
- * Configure the redaction.
235
- */
236
- Redaction: Redaction;
237
- }
238
- export interface Redaction {
239
- /**
240
- * Specify the text to redact.
241
- */
242
- FindText: string;
243
- /**
244
- * Specify how the text is found.
245
- */
246
- FindTextFlags: Dynamsoft.EnumDWT_OCRFindTextFlags | number;
247
- /**
248
- * Specify how redaction is done.
249
- */
250
- FindTextAction: Dynamsoft.EnumDWT_OCRFindTextAction | number;
251
- }
1
+ import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
2
+
3
+ export interface OCRPro {
4
+ /**
5
+ * Download and install the OCR Professional add-on on the local system.
6
+ * @param path The URL to download the add-on (typically a ZIP file).
7
+ * @param successCallback A callback function that is executed if the request succeeds.
8
+ * @param failureCallback A callback function that is executed if the request fails.
9
+ * @argument errorCode The error code.
10
+ * @argument errorString The error string.
11
+ */
12
+ Download(
13
+ path: string,
14
+ successCallback: () => void,
15
+ failureCallback: (
16
+ errorCode: number,
17
+ errorString: string
18
+ ) => void
19
+ ): void;
20
+ /**
21
+ * Return whether the OCR Professional engine has been installed.
22
+ */
23
+ IsModuleInstalled(): boolean;
24
+ /**
25
+ * Perform OCR on the specified image in the buffer.
26
+ * @param index Specify the image.
27
+ * @param successCallback A callback function that is executed if the request succeeds.
28
+ * @param failureCallback A callback function that is executed if the request fails.
29
+ * @argument imageId The imageId of the image which can be used to find the index.
30
+ * @argument result The OCR result.
31
+ * @argument errorCode The error code.
32
+ * @argument errorString The error string.
33
+ */
34
+ Recognize(
35
+ index: number,
36
+ successCallback: (
37
+ imageId: number,
38
+ result: OCRProResult
39
+ ) => void,
40
+ failureCallback: (
41
+ errorCode: number,
42
+ errorString: string
43
+ ) => void
44
+ ): void;
45
+ /**
46
+ * Perform OCR on the specified local file.
47
+ * @param path Specify a local file.
48
+ * @param successCallback A callback function that is executed if the request succeeds.
49
+ * @param failureCallback A callback function that is executed if the request fails.
50
+ * @argument path The file path.
51
+ * @argument result The OCR result.
52
+ * @argument errorCode The error code.
53
+ * @argument errorString The error string.
54
+ */
55
+ RecognizeFile(path: string,
56
+ successCallback: (
57
+ path: string,
58
+ result: OCRProResult
59
+ ) => void,
60
+ failureCallback: (
61
+ errorCode: number,
62
+ errorString: string
63
+ ) => void
64
+ ): void;
65
+ /**
66
+ * Perform OCR on the specified rectangular area(s) on the image.
67
+ * @param index Specify the image.
68
+ * @param aryRects Specify the rectangle(s).
69
+ * @param successCallback A callback function that is executed if the request succeeds.
70
+ * @param failureCallback A callback function that is executed if the request fails.
71
+ * @argument imageId The imageId of the image which can be used to find the index.
72
+ * @argument result The OCR result.
73
+ * @argument errorCode The error code.
74
+ * @argument errorString The error string.
75
+ */
76
+ RecognizeRect(
77
+ index: number,
78
+ aryRects: Rect[],
79
+ successCallback: (
80
+ imageId: number,
81
+ aryRects: Rect[],
82
+ result: OCRProResult
83
+ ) => void,
84
+ failureCallback: (
85
+ errorCode: number,
86
+ errorString: string
87
+ ) => void
88
+ ): void;
89
+ /**
90
+ * Perform OCR on the selected images in the buffer.
91
+ * @param index Specify the image.
92
+ * @param successCallback A callback function that is executed if the request succeeds.
93
+ * @param failureCallback A callback function that is executed if the request fails.
94
+ * @argument result The OCR result.
95
+ * @argument errorCode The error code.
96
+ * @argument errorString The error string.
97
+ */
98
+ RecognizeSelectedImages(
99
+ successCallback: (
100
+ result: OCRProResult
101
+ ) => void,
102
+ failureCallback: (
103
+ errorCode: number,
104
+ errorString: string
105
+ ) => void
106
+ ): void;
107
+ /**
108
+ * Return or set the current settings of the OCR engine.
109
+ */
110
+ Settings: Settings | boolean | null;
111
+ }
112
+ export interface Rect {
113
+ left: number;
114
+ right: number;
115
+ top: number;
116
+ bottom: number;
117
+ }
118
+ export interface OCRProResult {
119
+ /**
120
+ * Return a base64 string that contains the result of the OCR.
121
+ */
122
+ Get(): string;
123
+ /**
124
+ * Return the error code.
125
+ */
126
+ GetErrorCode(): number;
127
+ /**
128
+ * Return an array which contains detailed error information for each page that was OCR'd
129
+ */
130
+ GetErrorDetailList(): Error[];
131
+ /**
132
+ * Return the error string.
133
+ */
134
+ GetErrorString(): string;
135
+ /**
136
+ * Return the source information. It could be the index of the OCR'd image or the path of the OCR'd file.
137
+ */
138
+ GetInput(): number | string;
139
+ /**
140
+ * Return the number of pages already OCR'd on the machine.
141
+ */
142
+ GetAlreadyOCRCount(): string;
143
+ /**
144
+ * Return the number of pages allowed by the current license.
145
+ */
146
+ GetOCRTotalCount(): string;
147
+ /**
148
+ * Return the number of pages in the OCR result.
149
+ */
150
+ GetPageCount(): string;
151
+ /**
152
+ * Return the content of a page.
153
+ * @param index Specify the page
154
+ */
155
+ GetPageContent(index: number): Page;
156
+ /**
157
+ * Save the OCR result as a file.
158
+ * @param path The path to save the file.
159
+ */
160
+ Save(path: string): boolean;
161
+ }
162
+ export interface Error {
163
+ /**
164
+ * Return the index of the image or path of the file.
165
+ */
166
+ GetInput(): number | string;
167
+ /**
168
+ * Return the error message.
169
+ */
170
+ GetMessage(): string;
171
+ /**
172
+ * Return the number of the page on which the error was thrown.
173
+ * If the input is a file, this returns the index of the page in that file.
174
+ * If the input is an image in the buffer, this always returns 0.
175
+ */
176
+ GetPage(): number;
177
+ }
178
+ export interface Page {
179
+ /**
180
+ * Return the number of letters in the page.
181
+ */
182
+ GetLetterCount(): number;
183
+ /**
184
+ * Return the content of the specified letter.
185
+ * @index Specify the letter.
186
+ */
187
+ GetLetterContent(index: number): Letter;
188
+ /**
189
+ * Return the number of recognized rectangles in the page.
190
+ */
191
+ GetZoneCount(): number;
192
+ /**
193
+ * Return the base64-encoded content of the specified rectangle.
194
+ * @index Specify the line.
195
+ */
196
+ GetZoneContent(index: number): string;
197
+ }
198
+ export interface Letter {
199
+ /**
200
+ * Return the text of the letter.
201
+ */
202
+ GetText(): number;
203
+ /**
204
+ * Return the coordinates for the rectangle that contains the specified letter. The coordinates are in the sequence of "left,top,right,bottom" like "121,125,123,143".
205
+ */
206
+ GetLetterRect(): string;
207
+ }
208
+ export interface Settings {
209
+ /**
210
+ * Specify the target language.
211
+ */
212
+ Languages: string;
213
+ /**
214
+ * Specify the URL for the license checker.
215
+ */
216
+ LicenseChecker: string;
217
+ /**
218
+ * Specify the output format.
219
+ */
220
+ OutputFormat: Dynamsoft.EnumDWT_OCRProOutputFormat | string;
221
+ /**
222
+ * Specify the PDF/A version.
223
+ */
224
+ PDFAVersion: Dynamsoft.EnumDWT_OCRProPDFAVersion | string;
225
+ /**
226
+ * Specify the PDF version.
227
+ */
228
+ PDFVersion: Dynamsoft.EnumDWT_OCRProPDFVersion | string;
229
+ /**
230
+ * Specify the recognition module.
231
+ */
232
+ RecognitionModule: Dynamsoft.EnumDWT_OCRProRecognitionModule | string;
233
+ /**
234
+ * Configure the redaction.
235
+ */
236
+ Redaction: Redaction;
237
+ }
238
+ export interface Redaction {
239
+ /**
240
+ * Specify the text to redact.
241
+ */
242
+ FindText: string;
243
+ /**
244
+ * Specify how the text is found.
245
+ */
246
+ FindTextFlags: Dynamsoft.EnumDWT_OCRFindTextFlags | number;
247
+ /**
248
+ * Specify how redaction is done.
249
+ */
250
+ FindTextAction: Dynamsoft.EnumDWT_OCRFindTextAction | number;
251
+ }