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.
- package/README.md +16 -12
- package/dist/addon/dbrjs/dbr-7.6.0.full.wasm.js +4016 -4016
- package/dist/addon/dbrjs/dbr-7.6.0.worker.js +107 -107
- package/dist/addon/dbrjs/dbr.js +10 -10
- package/dist/dist/DynamsoftServiceSetup.deb +0 -0
- package/dist/dist/DynamsoftServiceSetup.msi +0 -0
- package/dist/dist/DynamsoftServiceSetup.pkg +0 -0
- package/dist/dist/DynamsoftServiceSetup.rpm +0 -0
- package/dist/dist/LICENSE +95 -95
- package/dist/dynamsoft.webtwain.min.js +209 -209
- package/dist/dynamsoft.webtwain.min.mjs +208 -208
- package/dist/src/dynamsoft.imageio_wasm-1.6.2.js +93 -93
- package/dist/src/dynamsoft.webtwain.css +1045 -1045
- package/dist/types/Addon.BarcodeReader.d.ts +168 -168
- package/dist/types/Addon.Camera.d.ts +125 -125
- package/dist/types/Addon.OCR.d.ts +264 -264
- package/dist/types/Addon.OCRPro.d.ts +251 -251
- package/dist/types/Addon.PDF.d.ts +110 -110
- package/dist/types/Addon.Webcam.d.ts +257 -257
- package/dist/types/Dynamsoft.Enum.d.ts +1850 -1849
- package/dist/types/Dynamsoft.FileUploader.d.ts +130 -130
- package/dist/types/Dynamsoft.d.ts +495 -495
- package/dist/types/WebTwain.Acquire.d.ts +1059 -1059
- package/dist/types/WebTwain.Buffer.d.ts +259 -259
- package/dist/types/WebTwain.Edit.d.ts +434 -434
- package/dist/types/WebTwain.IO.d.ts +951 -951
- package/dist/types/WebTwain.Util.d.ts +102 -102
- package/dist/types/WebTwain.Viewer.d.ts +795 -795
- package/dist/types/WebTwain.d.ts +51 -51
- package/dist/types/index.d.ts +20 -20
- package/package.json +2 -2
- package/samples/1.AcquireImage.html +0 -69
- package/samples/2.CustomScan.html +0 -98
- package/samples/3.PDFRasterizer.html +0 -73
- package/samples/4.OCRADocument.html +0 -156
- package/samples/5.ReadBarcode.html +0 -231
- package/samples/6.ScanOrCapture.html +0 -189
|
@@ -1,951 +1,951 @@
|
|
|
1
|
-
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
|
|
2
|
-
import { WebTwainUtil } from "./WebTwain.Util";
|
|
3
|
-
|
|
4
|
-
export interface WebTwainIO extends WebTwainUtil {
|
|
5
|
-
/**
|
|
6
|
-
* The password to connect to the FTP.
|
|
7
|
-
*/
|
|
8
|
-
FTPPassword: string;
|
|
9
|
-
/**
|
|
10
|
-
* The port to connect to the FTP.
|
|
11
|
-
*/
|
|
12
|
-
FTPPort: number;
|
|
13
|
-
/**
|
|
14
|
-
* The password to connect to the FTP.
|
|
15
|
-
*/
|
|
16
|
-
FTPUserName: string;
|
|
17
|
-
/**
|
|
18
|
-
* Return or set whether to use passive mode when connect to the FTP.
|
|
19
|
-
*/
|
|
20
|
-
IfPASVMode: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Return or set the field name for the uploaded file.
|
|
23
|
-
* By default, it's "RemoteFile".
|
|
24
|
-
*/
|
|
25
|
-
HttpFieldNameOfUploadedImage: string;
|
|
26
|
-
/**
|
|
27
|
-
* [Deprecation] Return or set the password used to log into the HTTP server.
|
|
28
|
-
*/
|
|
29
|
-
HTTPPassword: string;
|
|
30
|
-
/**
|
|
31
|
-
* [Deprecation] Return or set the user name used to log into the HTTP server.
|
|
32
|
-
*/
|
|
33
|
-
HTTPUserName: string;
|
|
34
|
-
/**
|
|
35
|
-
* Return or set the HTTP Port.
|
|
36
|
-
*/
|
|
37
|
-
HTTPPort: number;
|
|
38
|
-
/**
|
|
39
|
-
* Return or set whether to use SSL in HTTP requests.
|
|
40
|
-
*/
|
|
41
|
-
IfSSL: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Return the response string of the latest HTTP Post request.
|
|
44
|
-
*/
|
|
45
|
-
readonly HTTPPostResponseString: string;
|
|
46
|
-
/**
|
|
47
|
-
* Return or set whether to show open/save file dialog when saving images in the buffer or loading images from a local directory.
|
|
48
|
-
*/
|
|
49
|
-
IfShowFileDialog: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Return or set whether to show the progress of an operation with a button to cancel it.
|
|
52
|
-
*/
|
|
53
|
-
IfShowCancelDialogWhenImageTransfer: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Return or set whether to show the progressbar.
|
|
56
|
-
*/
|
|
57
|
-
IfShowProgressBar: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Return or set the quality for JPEG compression.
|
|
60
|
-
* The values range from 0 to 100.
|
|
61
|
-
*/
|
|
62
|
-
JPEGQuality: number;
|
|
63
|
-
/**
|
|
64
|
-
* Return or set whether to insert or append images when they are scanned/loaded.
|
|
65
|
-
*/
|
|
66
|
-
IfAppendImage: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Return or set whether to append to or replace an existing TIFF file with the same name.
|
|
69
|
-
*/
|
|
70
|
-
IfTiffMultiPage: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Return or set the compression type for TIFF files.
|
|
73
|
-
*/
|
|
74
|
-
TIFFCompressionType: Dynamsoft.EnumDWT_TIFFCompressionType | number;
|
|
75
|
-
/**
|
|
76
|
-
* Return or set the name of the person who creates the PDF document.
|
|
77
|
-
*/
|
|
78
|
-
PDFAuthor: string;
|
|
79
|
-
/**
|
|
80
|
-
* Return or set the compression type of PDF files. This is a runtime property.
|
|
81
|
-
*/
|
|
82
|
-
PDFCompressionType: Dynamsoft.EnumDWT_PDFCompressionType;
|
|
83
|
-
/**
|
|
84
|
-
* Return or set the date when the PDF document is created.
|
|
85
|
-
*/
|
|
86
|
-
PDFCreationDate: string;
|
|
87
|
-
/**
|
|
88
|
-
* Return or set the name of the application that created the original document, if the PDF document is converted from another form.
|
|
89
|
-
*/
|
|
90
|
-
PDFCreator: string;
|
|
91
|
-
/**
|
|
92
|
-
* Return or set the keywords associated with the PDF document.
|
|
93
|
-
*/
|
|
94
|
-
PDFKeywords: string;
|
|
95
|
-
/**
|
|
96
|
-
* Return or set the date when the PDF document is last modified.
|
|
97
|
-
*/
|
|
98
|
-
PDFModifiedDate: string;
|
|
99
|
-
/**
|
|
100
|
-
* Return or set the name of the application that converted the PDF document from its native.
|
|
101
|
-
*/
|
|
102
|
-
PDFProducer: string;
|
|
103
|
-
/**
|
|
104
|
-
* Return or set the subject of the PDF document.
|
|
105
|
-
*/
|
|
106
|
-
PDFSubject: string;
|
|
107
|
-
/**
|
|
108
|
-
* Return or set the title of the PDF document.
|
|
109
|
-
*/
|
|
110
|
-
PDFTitle: string;
|
|
111
|
-
/**
|
|
112
|
-
* Return or set the value of the PDF version.
|
|
113
|
-
*/
|
|
114
|
-
PDFVersion: string;
|
|
115
|
-
/**
|
|
116
|
-
* Clear all the custom fields from the HTTP Post Form.
|
|
117
|
-
*/
|
|
118
|
-
ClearAllHTTPFormField(): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Clear the content of all custom tiff tags.
|
|
121
|
-
*/
|
|
122
|
-
ClearTiffCustomTag(): boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Convert the specified images to a base64 string.
|
|
125
|
-
* @param indices Specify one or multiple images.
|
|
126
|
-
* @param type The file type.
|
|
127
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
128
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
129
|
-
* @argument result The resulting base64 string.
|
|
130
|
-
* @argument indices The indices of the converted images.
|
|
131
|
-
* @argument type The file type.
|
|
132
|
-
* @argument errorCode The error code.
|
|
133
|
-
* @argument errorString The error string.
|
|
134
|
-
*/
|
|
135
|
-
ConvertToBase64(
|
|
136
|
-
indices: number[],
|
|
137
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
138
|
-
successCallback: (
|
|
139
|
-
result: Base64Result,
|
|
140
|
-
indices: number[],
|
|
141
|
-
type: number) => void,
|
|
142
|
-
failureCallBack: (
|
|
143
|
-
errorCode: number,
|
|
144
|
-
errorString: string) => void
|
|
145
|
-
): void;
|
|
146
|
-
/**
|
|
147
|
-
* Convert the specified images to a blob.
|
|
148
|
-
* @param indices Specify one or multiple images.
|
|
149
|
-
* @param type The file type.
|
|
150
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
151
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
152
|
-
* @argument result The resulting blob.
|
|
153
|
-
* @argument indices The indices of the converted images.
|
|
154
|
-
* @argument type The file type.
|
|
155
|
-
* @argument errorCode The error code.
|
|
156
|
-
* @argument errorString The error string.
|
|
157
|
-
*/
|
|
158
|
-
ConvertToBlob(
|
|
159
|
-
indices: number[],
|
|
160
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
161
|
-
successCallback: (
|
|
162
|
-
result: Blob,
|
|
163
|
-
indices: number[],
|
|
164
|
-
type: number) => void,
|
|
165
|
-
failureCallBack: (
|
|
166
|
-
errorCode: number,
|
|
167
|
-
errorString: string) => void
|
|
168
|
-
): void;
|
|
169
|
-
/**
|
|
170
|
-
* Download the specified file via FTP
|
|
171
|
-
* @param host The FTP Host.
|
|
172
|
-
* @param path Specify the file to download.
|
|
173
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
174
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
175
|
-
* @argument errorCode The error code.
|
|
176
|
-
* @argument errorString The error string.
|
|
177
|
-
*/
|
|
178
|
-
FTPDownload(
|
|
179
|
-
host: string,
|
|
180
|
-
path: string,
|
|
181
|
-
successCallback: () => void,
|
|
182
|
-
failureCallBack: (
|
|
183
|
-
errorCode: number,
|
|
184
|
-
errorString: string) => void
|
|
185
|
-
): void;
|
|
186
|
-
/**
|
|
187
|
-
* Download the specified file via FTP.
|
|
188
|
-
* @param host The FTP Host.
|
|
189
|
-
* @param path Specify the file to download.
|
|
190
|
-
* @param type The format of the file.
|
|
191
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
192
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
193
|
-
* @argument errorCode The error code.
|
|
194
|
-
* @argument errorString The error string.
|
|
195
|
-
*/
|
|
196
|
-
FTPDownloadEx(
|
|
197
|
-
host: string,
|
|
198
|
-
path: string,
|
|
199
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
200
|
-
successCallback: () => void,
|
|
201
|
-
failureCallBack: (
|
|
202
|
-
errorCode: number,
|
|
203
|
-
errorString: string) => void
|
|
204
|
-
): void;
|
|
205
|
-
/**
|
|
206
|
-
* Upload the specified image via FTP.
|
|
207
|
-
* @param host The FTP Host.
|
|
208
|
-
* @param index Specify the image.
|
|
209
|
-
* @param path The path to save the file.
|
|
210
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
211
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
212
|
-
* @argument errorCode The error code.
|
|
213
|
-
* @argument errorString The error string.
|
|
214
|
-
*/
|
|
215
|
-
FTPUpload(
|
|
216
|
-
host: string,
|
|
217
|
-
index: number,
|
|
218
|
-
path: string,
|
|
219
|
-
successCallback: () => void,
|
|
220
|
-
failureCallback: (
|
|
221
|
-
errorCode: number,
|
|
222
|
-
errorString: string) => void
|
|
223
|
-
): void;
|
|
224
|
-
/**
|
|
225
|
-
* Upload the specified image via FTP.
|
|
226
|
-
* @param host The FTP Host.
|
|
227
|
-
* @param index Specify the image.
|
|
228
|
-
* @param path The path to save the file.
|
|
229
|
-
* @param type The format of the file.
|
|
230
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
231
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
232
|
-
* @argument errorCode The error code.
|
|
233
|
-
* @argument errorString The error string.
|
|
234
|
-
*/
|
|
235
|
-
FTPUploadEx(
|
|
236
|
-
host: string,
|
|
237
|
-
index: number,
|
|
238
|
-
path: string,
|
|
239
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
240
|
-
successCallback: () => void,
|
|
241
|
-
failureCallback: (
|
|
242
|
-
errorCode: number,
|
|
243
|
-
errorString: string) => void
|
|
244
|
-
): void;
|
|
245
|
-
/**
|
|
246
|
-
* Upload all images as a multi-page TIFF via FTP.
|
|
247
|
-
* @param host The FTP Host.
|
|
248
|
-
* @param path Specify the path to save the file.
|
|
249
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
250
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
251
|
-
* @argument errorCode The error code.
|
|
252
|
-
* @argument errorString The error string.
|
|
253
|
-
*/
|
|
254
|
-
FTPUploadAllAsMultiPageTIFF(
|
|
255
|
-
host: string,
|
|
256
|
-
path: string,
|
|
257
|
-
successCallback: () => void,
|
|
258
|
-
failureCallback: (
|
|
259
|
-
errorCode: number,
|
|
260
|
-
errorString: string) => void
|
|
261
|
-
): void;
|
|
262
|
-
/**
|
|
263
|
-
* Upload all images as a multi-page PDF via FTP.
|
|
264
|
-
* @param host The FTP Host.
|
|
265
|
-
* @param path Specify the path to save the file.
|
|
266
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
267
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
268
|
-
* @argument errorCode The error code.
|
|
269
|
-
* @argument errorString The error string.
|
|
270
|
-
*/
|
|
271
|
-
FTPUploadAllAsPDF(
|
|
272
|
-
host: string,
|
|
273
|
-
path: string,
|
|
274
|
-
successCallback: () => void,
|
|
275
|
-
failureCallback: (
|
|
276
|
-
errorCode: number,
|
|
277
|
-
errorString: string) => void
|
|
278
|
-
): void;
|
|
279
|
-
/**
|
|
280
|
-
* Upload selected images as a multi-page PDF via FTP.
|
|
281
|
-
* @param host The FTP Host.
|
|
282
|
-
* @param path Specify the path to save the file.
|
|
283
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
284
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
285
|
-
* @argument errorCode The error code.
|
|
286
|
-
* @argument errorString The error string.
|
|
287
|
-
*/
|
|
288
|
-
FTPUploadAsMultiPagePDF(
|
|
289
|
-
host: string,
|
|
290
|
-
path: string,
|
|
291
|
-
successCallback: () => void,
|
|
292
|
-
failureCallback: (
|
|
293
|
-
errorCode: number,
|
|
294
|
-
errorString: string) => void
|
|
295
|
-
): void;
|
|
296
|
-
/**
|
|
297
|
-
* Upload selected images as a multi-page TIFF via FTP.
|
|
298
|
-
* @param host The FTP Host.
|
|
299
|
-
* @param path Specify the path to save the file.
|
|
300
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
301
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
302
|
-
* @argument errorCode The error code.
|
|
303
|
-
* @argument errorString The error string.
|
|
304
|
-
*/
|
|
305
|
-
FTPUploadAsMultiPageTIFF(
|
|
306
|
-
host: string,
|
|
307
|
-
path: string,
|
|
308
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
309
|
-
successCallback: () => void,
|
|
310
|
-
failureCallback: (
|
|
311
|
-
errorCode: number,
|
|
312
|
-
errorString: string) => void
|
|
313
|
-
): void;
|
|
314
|
-
/**
|
|
315
|
-
* Download the specified file via a HTTP Get request.
|
|
316
|
-
* @param host The HTTP Host.
|
|
317
|
-
* @param path Specify the path of the file to download.
|
|
318
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
319
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
320
|
-
* @argument errorCode The error code.
|
|
321
|
-
* @argument errorString The error string.
|
|
322
|
-
*/
|
|
323
|
-
HTTPDownload(
|
|
324
|
-
host: string,
|
|
325
|
-
path: string,
|
|
326
|
-
successCallback: () => void,
|
|
327
|
-
failureCallback: (
|
|
328
|
-
errorCode: number,
|
|
329
|
-
errorString: string) => void
|
|
330
|
-
): void;
|
|
331
|
-
/**
|
|
332
|
-
* Download the specified file via a HTTP Get request.
|
|
333
|
-
* @param host The HTTP Host.
|
|
334
|
-
* @param path Specify the path of the file to download.
|
|
335
|
-
* @param type The format of the file.
|
|
336
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
337
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
338
|
-
* @argument errorCode The error code.
|
|
339
|
-
* @argument errorString The error string.
|
|
340
|
-
*/
|
|
341
|
-
HTTPDownloadEx(
|
|
342
|
-
host: string,
|
|
343
|
-
path: string,
|
|
344
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
345
|
-
successCallback: () => void,
|
|
346
|
-
failureCallback: (
|
|
347
|
-
errorCode: number,
|
|
348
|
-
errorString: string) => void
|
|
349
|
-
): void;
|
|
350
|
-
/**
|
|
351
|
-
* Download the specified file via a HTTP Post request.
|
|
352
|
-
* @param host The HTTP Host.
|
|
353
|
-
* @param path Specify the path of the file to download.
|
|
354
|
-
* @param type The format of the file.
|
|
355
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
356
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
357
|
-
* @argument errorCode The error code.
|
|
358
|
-
* @argument errorString The error string.
|
|
359
|
-
* @argument response The response string.
|
|
360
|
-
*/
|
|
361
|
-
HTTPDownloadThroughPost(
|
|
362
|
-
host: string,
|
|
363
|
-
path: string,
|
|
364
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
365
|
-
onEmptyResponse: () => void,
|
|
366
|
-
onServerReturnedSomething: (
|
|
367
|
-
errorCode: number,
|
|
368
|
-
errorString: string,
|
|
369
|
-
response: string) => void
|
|
370
|
-
): void;
|
|
371
|
-
/**
|
|
372
|
-
* Download the specified file via a HTTP Get request.
|
|
373
|
-
* @param host The HTTP Host.
|
|
374
|
-
* @param path Specify the path of the file to download.
|
|
375
|
-
* @param localPath Specify where to save the file.
|
|
376
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
377
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
378
|
-
* @argument errorCode The error code.
|
|
379
|
-
* @argument errorString The error string.
|
|
380
|
-
*/
|
|
381
|
-
HTTPDownloadDirectly(
|
|
382
|
-
host: string,
|
|
383
|
-
path: string,
|
|
384
|
-
localPath: string,
|
|
385
|
-
successCallback: () => void,
|
|
386
|
-
failureCallback: (
|
|
387
|
-
errorCode: number,
|
|
388
|
-
errorString: string) => void
|
|
389
|
-
): void;
|
|
390
|
-
/**
|
|
391
|
-
* Upload the specified image(s) via a HTTP Post.
|
|
392
|
-
* @param URL The server-side script to receive the post.
|
|
393
|
-
* @param indices Specify the image(s).
|
|
394
|
-
* @param type The format of the file.
|
|
395
|
-
* @param dataFormat Whether to upload the file as binary or a base64 string.
|
|
396
|
-
* @param fileName The file name.
|
|
397
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
398
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
399
|
-
* @argument errorCode The error code.
|
|
400
|
-
* @argument errorString The error string.
|
|
401
|
-
* @argument response The response string.
|
|
402
|
-
*/
|
|
403
|
-
HTTPUpload(
|
|
404
|
-
URL: string,
|
|
405
|
-
indices: number[],
|
|
406
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
407
|
-
dataFormat: Dynamsoft.EnumDWT_UploadDataFormat | number,
|
|
408
|
-
fileName: string,
|
|
409
|
-
onEmptyResponse: () => void,
|
|
410
|
-
onServerReturnedSomething: (
|
|
411
|
-
errorCode: number,
|
|
412
|
-
errorString: string,
|
|
413
|
-
response: string) => void
|
|
414
|
-
): void;
|
|
415
|
-
HTTPUpload(
|
|
416
|
-
URL: string,
|
|
417
|
-
indices: number[],
|
|
418
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
419
|
-
dataFormat: Dynamsoft.EnumDWT_UploadDataFormat | number,
|
|
420
|
-
onEmptyResponse: () => void,
|
|
421
|
-
onServerReturnedSomething: (
|
|
422
|
-
errorCode: number,
|
|
423
|
-
errorString: string,
|
|
424
|
-
response: string) => void
|
|
425
|
-
): void;
|
|
426
|
-
HTTPUpload(
|
|
427
|
-
URL: string,
|
|
428
|
-
onEmptyResponse: () => void,
|
|
429
|
-
onServerReturnedSomething: (
|
|
430
|
-
errorCode: number,
|
|
431
|
-
errorString: string,
|
|
432
|
-
response: string) => void
|
|
433
|
-
): void;
|
|
434
|
-
/**
|
|
435
|
-
* Upload the specified image via a HTTP Put request.
|
|
436
|
-
* @param host The HTTP Host.
|
|
437
|
-
* @param index Specify the image.
|
|
438
|
-
* @param path Specify the path to put the file.
|
|
439
|
-
* @param type The format of the file.
|
|
440
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
441
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
442
|
-
* @argument errorCode The error code.
|
|
443
|
-
* @argument errorString The error string.
|
|
444
|
-
*/
|
|
445
|
-
HTTPUploadThroughPutEx(
|
|
446
|
-
host: string,
|
|
447
|
-
index: number,
|
|
448
|
-
path: string,
|
|
449
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
450
|
-
successCallback: () => void,
|
|
451
|
-
failureCallback: (
|
|
452
|
-
errorCode: number,
|
|
453
|
-
errorString: string) => void
|
|
454
|
-
): void;
|
|
455
|
-
/**
|
|
456
|
-
* Upload the specified image via a HTTP Post request.
|
|
457
|
-
* @param host The HTTP Host.
|
|
458
|
-
* @param index Specify the image.
|
|
459
|
-
* @param target The target wherethe request is sent.
|
|
460
|
-
* @param type The format of the file.
|
|
461
|
-
* @param fileName The file name.
|
|
462
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
463
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
464
|
-
* @argument errorCode The error code.
|
|
465
|
-
* @argument errorString The error string.
|
|
466
|
-
* @argument response The response string.
|
|
467
|
-
*/
|
|
468
|
-
HTTPUploadThroughPost(
|
|
469
|
-
host: string,
|
|
470
|
-
index: number,
|
|
471
|
-
target: string,
|
|
472
|
-
fileName: string,
|
|
473
|
-
onEmptyResponse: () => void,
|
|
474
|
-
onServerReturnedSomething: (
|
|
475
|
-
errorCode: number,
|
|
476
|
-
errorString: string,
|
|
477
|
-
response: string) => void
|
|
478
|
-
): void;
|
|
479
|
-
/**
|
|
480
|
-
* Upload the specified image via a HTTP Post request.
|
|
481
|
-
* @param host The HTTP Host.
|
|
482
|
-
* @param index Specify the image.
|
|
483
|
-
* @param target The target wherethe request is sent.
|
|
484
|
-
* @param fileName The file name.
|
|
485
|
-
* @param type The format of the file.
|
|
486
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
487
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
488
|
-
* @argument errorCode The error code.
|
|
489
|
-
* @argument errorString The error string.
|
|
490
|
-
* @argument response The response string.
|
|
491
|
-
*/
|
|
492
|
-
HTTPUploadThroughPostEx(
|
|
493
|
-
host: string,
|
|
494
|
-
index: number,
|
|
495
|
-
target: string,
|
|
496
|
-
fileName: string,
|
|
497
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
498
|
-
onEmptyResponse: () => void,
|
|
499
|
-
onServerReturnedSomething: (
|
|
500
|
-
errorCode: number,
|
|
501
|
-
errorString: string,
|
|
502
|
-
response: string) => void
|
|
503
|
-
): void;
|
|
504
|
-
/**
|
|
505
|
-
* Upload all images in the buffer as a TIFF file via a HTTP Post request.
|
|
506
|
-
* @param host The HTTP Host.
|
|
507
|
-
* @param target The target wherethe request is sent.
|
|
508
|
-
* @param fileName The file name.
|
|
509
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
510
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
511
|
-
* @argument errorCode The error code.
|
|
512
|
-
* @argument errorString The error string.
|
|
513
|
-
* @argument response The response string.
|
|
514
|
-
*/
|
|
515
|
-
HTTPUploadAllThroughPostAsMultiPageTIFF(
|
|
516
|
-
host: string,
|
|
517
|
-
target: string,
|
|
518
|
-
fileName: string,
|
|
519
|
-
onEmptyResponse: () => void,
|
|
520
|
-
onServerReturnedSomething: (
|
|
521
|
-
errorCode: number,
|
|
522
|
-
errorString: string,
|
|
523
|
-
response: string) => void
|
|
524
|
-
): void;
|
|
525
|
-
/**
|
|
526
|
-
* Upload all images in the buffer as a PDF file via a HTTP Post request.
|
|
527
|
-
* @param host The HTTP Host.
|
|
528
|
-
* @param target The target wherethe request is sent.
|
|
529
|
-
* @param fileName The file name.
|
|
530
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
531
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
532
|
-
* @argument errorCode The error code.
|
|
533
|
-
* @argument errorString The error string.
|
|
534
|
-
* @argument response The response string.
|
|
535
|
-
*/
|
|
536
|
-
HTTPUploadAllThroughPostAsPDF(
|
|
537
|
-
host: string,
|
|
538
|
-
target: string,
|
|
539
|
-
fileName: string,
|
|
540
|
-
onEmptyResponse: () => void,
|
|
541
|
-
onServerReturnedSomething: (
|
|
542
|
-
errorCode: number,
|
|
543
|
-
errorString: string,
|
|
544
|
-
response: string) => void
|
|
545
|
-
): void;
|
|
546
|
-
/**
|
|
547
|
-
* Upload all selected images in the buffer as a PDF file via a HTTP Post request.
|
|
548
|
-
* @param host The HTTP Host.
|
|
549
|
-
* @param target The target wherethe request is sent.
|
|
550
|
-
* @param fileName The file name.
|
|
551
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
552
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
553
|
-
* @argument errorCode The error code.
|
|
554
|
-
* @argument errorString The error string.
|
|
555
|
-
* @argument response The response string.
|
|
556
|
-
*/
|
|
557
|
-
HTTPUploadThroughPostAsMultiPagePDF(
|
|
558
|
-
host: string,
|
|
559
|
-
target: string,
|
|
560
|
-
fileName: string,
|
|
561
|
-
onEmptyResponse: () => void,
|
|
562
|
-
onServerReturnedSomething: (
|
|
563
|
-
errorCode: number,
|
|
564
|
-
errorString: string,
|
|
565
|
-
response: string) => void
|
|
566
|
-
): void;
|
|
567
|
-
/**
|
|
568
|
-
* Upload all selected images in the buffer as a TIFF file via a HTTP Post request.
|
|
569
|
-
* @param host The HTTP Host.
|
|
570
|
-
* @param target The target wherethe request is sent.
|
|
571
|
-
* @param fileName The file name.
|
|
572
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
573
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
574
|
-
* @argument errorCode The error code.
|
|
575
|
-
* @argument errorString The error string.
|
|
576
|
-
* @argument response The response string.
|
|
577
|
-
*/
|
|
578
|
-
HTTPUploadThroughPostAsMultiPageTIFF(
|
|
579
|
-
host: string,
|
|
580
|
-
target: string,
|
|
581
|
-
fileName: string,
|
|
582
|
-
onEmptyResponse: () => void,
|
|
583
|
-
onServerReturnedSomething: (
|
|
584
|
-
errorCode: number,
|
|
585
|
-
errorString: string,
|
|
586
|
-
response: string) => void
|
|
587
|
-
): void;
|
|
588
|
-
/**
|
|
589
|
-
* Upload the specified file via a HTTP Post request.
|
|
590
|
-
* @param host The HTTP Host.
|
|
591
|
-
* @param path Specify the file to upload.
|
|
592
|
-
* @param target The target wherethe request is sent.
|
|
593
|
-
* @param fileName The file name.
|
|
594
|
-
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
595
|
-
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
596
|
-
* @argument errorCode The error code.
|
|
597
|
-
* @argument errorString The error string.
|
|
598
|
-
* @argument response The response string.
|
|
599
|
-
*/
|
|
600
|
-
HTTPUploadThroughPostDirectly(
|
|
601
|
-
host: string,
|
|
602
|
-
path: string,
|
|
603
|
-
target: string,
|
|
604
|
-
fileName: string,
|
|
605
|
-
onEmptyResponse: () => void,
|
|
606
|
-
onServerReturnedSomething: (
|
|
607
|
-
errorCode: number,
|
|
608
|
-
errorString: string,
|
|
609
|
-
response: string) => void
|
|
610
|
-
): void;
|
|
611
|
-
/**
|
|
612
|
-
* Load image(s) specified by its absolute path.
|
|
613
|
-
* @param fileName The path of the image to load.
|
|
614
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
615
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
616
|
-
* @argument errorCode The error code.
|
|
617
|
-
* @argument errorString The error string.
|
|
618
|
-
*/
|
|
619
|
-
LoadImage(
|
|
620
|
-
fileName: string,
|
|
621
|
-
successCallback?: () => void,
|
|
622
|
-
failureCallback?: (
|
|
623
|
-
errorCode: number,
|
|
624
|
-
errorString: string) => void
|
|
625
|
-
): void | boolean;
|
|
626
|
-
/**
|
|
627
|
-
* Load image(s) specified by its absolute path.
|
|
628
|
-
* @param fileName The path of the image to load.
|
|
629
|
-
* @param type The format of the image.
|
|
630
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
631
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
632
|
-
* @argument errorCode The error code.
|
|
633
|
-
* @argument errorString The error string.
|
|
634
|
-
*/
|
|
635
|
-
LoadImageEx(
|
|
636
|
-
fileName: string,
|
|
637
|
-
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
638
|
-
successCallback?: () => void,
|
|
639
|
-
failureCallback?: (
|
|
640
|
-
errorCode: number,
|
|
641
|
-
errorString: string) => void
|
|
642
|
-
): void | boolean;
|
|
643
|
-
/**
|
|
644
|
-
* Load image(s) from a base64 string.
|
|
645
|
-
* @param imageData The image data which is a base64 string without the data URI scheme.
|
|
646
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
647
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
648
|
-
* @argument errorCode The error code.
|
|
649
|
-
* @argument errorString The error string.
|
|
650
|
-
*/
|
|
651
|
-
LoadImageFromBase64Binary(
|
|
652
|
-
imageData: string,
|
|
653
|
-
imageType: Dynamsoft.EnumDWT_ImageType,
|
|
654
|
-
successCallback?: () => void,
|
|
655
|
-
failureCallback?: (
|
|
656
|
-
errorCode: number,
|
|
657
|
-
errorString: string) => void
|
|
658
|
-
): void | boolean;
|
|
659
|
-
/**
|
|
660
|
-
* Load image(s) from a binary object (Blob | ArrayBuffer).
|
|
661
|
-
* @param imageData The image data.
|
|
662
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
663
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
664
|
-
* @argument errorCode The error code.
|
|
665
|
-
* @argument errorString The error string.
|
|
666
|
-
*/
|
|
667
|
-
LoadImageFromBinary(
|
|
668
|
-
imageData: Blob | ArrayBuffer,
|
|
669
|
-
successCallback: () => void,
|
|
670
|
-
failureCallback: (
|
|
671
|
-
errorCode: number,
|
|
672
|
-
errorString: string) => void
|
|
673
|
-
): void;
|
|
674
|
-
/**
|
|
675
|
-
* Load an image from the system clipboard. The image must be in DIB format.
|
|
676
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
677
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
678
|
-
* @argument errorCode The error code.
|
|
679
|
-
* @argument errorString The error string.
|
|
680
|
-
*/
|
|
681
|
-
LoadDibFromClipboard(
|
|
682
|
-
successCallback?: () => void,
|
|
683
|
-
failureCallback?: (
|
|
684
|
-
errorCode: number,
|
|
685
|
-
errorString: string) => void
|
|
686
|
-
): void | boolean;
|
|
687
|
-
/**
|
|
688
|
-
* [Deprecation] Return or set how many threads can be used when you upload files through POST.
|
|
689
|
-
*/
|
|
690
|
-
MaxInternetTransferThreads: number;
|
|
691
|
-
/**
|
|
692
|
-
* Return or set the maximum allowed size of a file to upload (in bytes).
|
|
693
|
-
*/
|
|
694
|
-
MaxUploadImageSize: number;
|
|
695
|
-
/**
|
|
696
|
-
* Export all image data in the buffer to a new browser window and use the browser's built-in print feature to print the image(s).
|
|
697
|
-
* @param useOSPrintWindow Whether to use the print feature of the operating system instead.
|
|
698
|
-
*/
|
|
699
|
-
Print(useOSPrintWindow?: boolean): boolean;
|
|
700
|
-
/**
|
|
701
|
-
* Save the specified image as a BMP file.
|
|
702
|
-
* @param fileName The name to save to.
|
|
703
|
-
* @param index The index which specifies the image to save.
|
|
704
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
705
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
706
|
-
* @argument errorCode The error code.
|
|
707
|
-
* @argument errorString The error string.
|
|
708
|
-
*/
|
|
709
|
-
SaveAsBMP(
|
|
710
|
-
fileName: string,
|
|
711
|
-
index: number,
|
|
712
|
-
successCallback?: () => void,
|
|
713
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
714
|
-
): void | boolean;
|
|
715
|
-
/**
|
|
716
|
-
* Save the specified image as a JPEG file.
|
|
717
|
-
* @param fileName The name to save to.
|
|
718
|
-
* @param index The index which specifies the image to save.
|
|
719
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
720
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
721
|
-
* @argument errorCode The error code.
|
|
722
|
-
* @argument errorString The error string.
|
|
723
|
-
*/
|
|
724
|
-
SaveAsJPEG(
|
|
725
|
-
fileName: string,
|
|
726
|
-
index: number,
|
|
727
|
-
successCallback?: () => void,
|
|
728
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
729
|
-
): void | boolean;
|
|
730
|
-
/**
|
|
731
|
-
* Save the specified image as a PDF file.
|
|
732
|
-
* @param fileName The name to save to.
|
|
733
|
-
* @param index The index which specifies the image to save.
|
|
734
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
735
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
736
|
-
* @argument errorCode The error code.
|
|
737
|
-
* @argument errorString The error string.
|
|
738
|
-
*/
|
|
739
|
-
SaveAsPDF(
|
|
740
|
-
fileName: string,
|
|
741
|
-
index: number,
|
|
742
|
-
successCallback?: () => void,
|
|
743
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
744
|
-
): void | boolean;
|
|
745
|
-
/**
|
|
746
|
-
* Save the specified image as a PNG file.
|
|
747
|
-
* @param fileName The name to save to.
|
|
748
|
-
* @param index The index which specifies the image to save.
|
|
749
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
750
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
751
|
-
* @argument errorCode The error code.
|
|
752
|
-
* @argument errorString The error string.
|
|
753
|
-
*/
|
|
754
|
-
SaveAsPNG(
|
|
755
|
-
fileName: string,
|
|
756
|
-
index: number,
|
|
757
|
-
successCallback?: () => void,
|
|
758
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
759
|
-
): void | boolean;
|
|
760
|
-
/**
|
|
761
|
-
* Save the specified image as a TIFF file.
|
|
762
|
-
* @param fileName The name to save to.
|
|
763
|
-
* @param index The index which specifies the image to save.
|
|
764
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
765
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
766
|
-
* @argument errorCode The error code.
|
|
767
|
-
* @argument errorString The error string.
|
|
768
|
-
*/
|
|
769
|
-
SaveAsTIFF(
|
|
770
|
-
fileName: string,
|
|
771
|
-
index: number,
|
|
772
|
-
successCallback?: () => void,
|
|
773
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
774
|
-
): void | boolean;
|
|
775
|
-
/**
|
|
776
|
-
* Saves all the images in buffer as a multi-page TIFF file.
|
|
777
|
-
* @param fileName The name to save to.
|
|
778
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
779
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
780
|
-
* @argument errorCode The error code.
|
|
781
|
-
* @argument errorString The error string.
|
|
782
|
-
*/
|
|
783
|
-
SaveAllAsMultiPageTIFF(
|
|
784
|
-
fileName: string,
|
|
785
|
-
successCallback?: () => void,
|
|
786
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
787
|
-
): void | boolean;
|
|
788
|
-
/**
|
|
789
|
-
* Saves all the images in buffer as a multi-page PDF file.
|
|
790
|
-
* @param fileName The name to save to.
|
|
791
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
792
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
793
|
-
* @argument errorCode The error code.
|
|
794
|
-
* @argument errorString The error string.
|
|
795
|
-
*/
|
|
796
|
-
SaveAllAsPDF(
|
|
797
|
-
fileName: string,
|
|
798
|
-
successCallback?: () => void,
|
|
799
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
800
|
-
): void | boolean;
|
|
801
|
-
/**
|
|
802
|
-
* Saves all selected images in buffer as a multi-page PDF file.
|
|
803
|
-
* @param fileName The name to save to.
|
|
804
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
805
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
806
|
-
* @argument errorCode The error code.
|
|
807
|
-
* @argument errorString The error string.
|
|
808
|
-
*/
|
|
809
|
-
SaveSelectedImagesAsMultiPagePDF(
|
|
810
|
-
fileName: string,
|
|
811
|
-
successCallback?: () => void,
|
|
812
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
813
|
-
): void | boolean;
|
|
814
|
-
/**
|
|
815
|
-
* Saves all selected images in buffer as a multi-page TIFF file.
|
|
816
|
-
* @param fileName The name to save to.
|
|
817
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
818
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
819
|
-
* @argument errorCode The error code.
|
|
820
|
-
* @argument errorString The error string.
|
|
821
|
-
*/
|
|
822
|
-
SaveSelectedImagesAsMultiPageTIFF(
|
|
823
|
-
fileName: string,
|
|
824
|
-
successCallback?: () => void,
|
|
825
|
-
failureCallback?: (
|
|
826
|
-
errorCode: number,
|
|
827
|
-
errorString: string) => void
|
|
828
|
-
): void | boolean;
|
|
829
|
-
/**
|
|
830
|
-
* [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
|
|
831
|
-
* [Alternative] Read SelectedImagesIndices instead.
|
|
832
|
-
* @param indexOfIndices Specify the index of the specified image.
|
|
833
|
-
*/
|
|
834
|
-
SaveSelectedImagesToBase64Binary(indexOfIndices: number): number;
|
|
835
|
-
/**
|
|
836
|
-
* [Deprecation] Saves the selected images in the buffer to a base64 string.
|
|
837
|
-
* [Alternative] Use ConvertToBase64 instead.
|
|
838
|
-
* @param successCallback A callback function that is executed if the request succeeds.
|
|
839
|
-
* @param failureCallback A callback function that is executed if the request fails.
|
|
840
|
-
* @argument result The resulting array of strings.
|
|
841
|
-
* @argument errorCode The error code.
|
|
842
|
-
* @argument errorString The error string.
|
|
843
|
-
*/
|
|
844
|
-
SaveSelectedImagesToBase64Binary(
|
|
845
|
-
successCallback?: (result: string[]) => void,
|
|
846
|
-
failureCallback?: (errorCode: number, errorString: string) => void
|
|
847
|
-
): string | boolean;
|
|
848
|
-
/**
|
|
849
|
-
* Add a custom field to the HTTP Post Form.
|
|
850
|
-
* @param name The name of the field.
|
|
851
|
-
* @param value The value of the field.
|
|
852
|
-
*/
|
|
853
|
-
SetHTTPFormField(
|
|
854
|
-
name: string,
|
|
855
|
-
value: string
|
|
856
|
-
): boolean;
|
|
857
|
-
/**
|
|
858
|
-
* Add a binary file to the HTTP Post Form.
|
|
859
|
-
* @param name The name of the field.
|
|
860
|
-
* @param content The content of the file.
|
|
861
|
-
* @param fileName The name of the file.
|
|
862
|
-
*/
|
|
863
|
-
SetHTTPFormField(
|
|
864
|
-
name: string,
|
|
865
|
-
content: Blob,
|
|
866
|
-
fileName?: string
|
|
867
|
-
): boolean;
|
|
868
|
-
/**
|
|
869
|
-
* Add a custom header to the HTTP Post Form.
|
|
870
|
-
* @param name The name of the field.
|
|
871
|
-
* @param value The value of the field.
|
|
872
|
-
*/
|
|
873
|
-
SetHTTPHeader(
|
|
874
|
-
name: string,
|
|
875
|
-
value: string
|
|
876
|
-
): boolean;
|
|
877
|
-
/**
|
|
878
|
-
* Clear the content of all custom tiff tags.
|
|
879
|
-
* @param id The id of the custom tag.
|
|
880
|
-
* @param content The content of the tag.
|
|
881
|
-
* @param useBase64Encoding Whether the content is encoded.
|
|
882
|
-
*/
|
|
883
|
-
SetTiffCustomTag(
|
|
884
|
-
id: number,
|
|
885
|
-
content: string,
|
|
886
|
-
useBase64Encoding: boolean
|
|
887
|
-
): boolean;
|
|
888
|
-
/**
|
|
889
|
-
* Set the segmentation threshold and segment size.
|
|
890
|
-
* @param threshold Specify the threshold (in MB).
|
|
891
|
-
* @param size Specify the segment size (in KB).
|
|
892
|
-
*/
|
|
893
|
-
SetUploadSegment(
|
|
894
|
-
threshold: number,
|
|
895
|
-
size: number
|
|
896
|
-
): boolean;
|
|
897
|
-
/**
|
|
898
|
-
* Show the system's save-file dialog or open-file dialog.
|
|
899
|
-
* @param isSave Whether to show a save-file dialog or an open-file dialog
|
|
900
|
-
* @param filter The filter pattern like "JPG | *.jpg".
|
|
901
|
-
* @param filterIndex The order of the filter. Normally, just put 0.
|
|
902
|
-
* @param defaultExtension Extension to be appended to the file name. Only valid in a save-file dialog
|
|
903
|
-
* @param initialDirectory The initial directory that the dialog opens.
|
|
904
|
-
* @param allowMultiSelect Whether or not multiple files can be selected at the same time. Only valid in an open-file dialog.
|
|
905
|
-
* @param showOverwritePrompt Whether or not a prompt shows up when saving a file may overwrite an existing file.
|
|
906
|
-
* @param flag If set to 0, bAllowMultiSelect and bShowOverwritePrompt will be effective. Otherwise, these two parameters are ignored.
|
|
907
|
-
*/
|
|
908
|
-
ShowFileDialog(
|
|
909
|
-
isSave: boolean,
|
|
910
|
-
filter: string,
|
|
911
|
-
filterIndex: number,
|
|
912
|
-
defaultExtension: string,
|
|
913
|
-
initialDirectory: string,
|
|
914
|
-
allowMultiSelect: boolean,
|
|
915
|
-
showOverwritePrompt: boolean,
|
|
916
|
-
flag: number
|
|
917
|
-
): boolean;
|
|
918
|
-
/**
|
|
919
|
-
* [Deprecation] Set a cookie string into the Http Header to be used when uploading scanned images through POST.
|
|
920
|
-
* @param cookie The cookie.
|
|
921
|
-
*/
|
|
922
|
-
SetCookie(cookie: string): boolean;
|
|
923
|
-
}
|
|
924
|
-
export interface Base64Result {
|
|
925
|
-
/**
|
|
926
|
-
* Return the length of the result string.
|
|
927
|
-
*/
|
|
928
|
-
getLength(): number;
|
|
929
|
-
/**
|
|
930
|
-
* Return part of the string.
|
|
931
|
-
* @param offset The starting position.
|
|
932
|
-
* @param length The length of the expected string.
|
|
933
|
-
*/
|
|
934
|
-
getData(offset: number, length: number): string;
|
|
935
|
-
/**
|
|
936
|
-
* Return the MD5 value of the result.
|
|
937
|
-
*/
|
|
938
|
-
getMD5(): string;
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* Details for each license
|
|
942
|
-
*/
|
|
943
|
-
export interface LicenseDetailItem {
|
|
944
|
-
readonly Browser: string;
|
|
945
|
-
readonly EnumLicenseType: string;
|
|
946
|
-
readonly ExpireDate: string;
|
|
947
|
-
readonly LicenseType: string;
|
|
948
|
-
readonly OS: string;
|
|
949
|
-
readonly Trial: string;
|
|
950
|
-
readonly Version: string;
|
|
951
|
-
}
|
|
1
|
+
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
|
|
2
|
+
import { WebTwainUtil } from "./WebTwain.Util";
|
|
3
|
+
|
|
4
|
+
export interface WebTwainIO extends WebTwainUtil {
|
|
5
|
+
/**
|
|
6
|
+
* The password to connect to the FTP.
|
|
7
|
+
*/
|
|
8
|
+
FTPPassword: string;
|
|
9
|
+
/**
|
|
10
|
+
* The port to connect to the FTP.
|
|
11
|
+
*/
|
|
12
|
+
FTPPort: number;
|
|
13
|
+
/**
|
|
14
|
+
* The password to connect to the FTP.
|
|
15
|
+
*/
|
|
16
|
+
FTPUserName: string;
|
|
17
|
+
/**
|
|
18
|
+
* Return or set whether to use passive mode when connect to the FTP.
|
|
19
|
+
*/
|
|
20
|
+
IfPASVMode: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Return or set the field name for the uploaded file.
|
|
23
|
+
* By default, it's "RemoteFile".
|
|
24
|
+
*/
|
|
25
|
+
HttpFieldNameOfUploadedImage: string;
|
|
26
|
+
/**
|
|
27
|
+
* [Deprecation] Return or set the password used to log into the HTTP server.
|
|
28
|
+
*/
|
|
29
|
+
HTTPPassword: string;
|
|
30
|
+
/**
|
|
31
|
+
* [Deprecation] Return or set the user name used to log into the HTTP server.
|
|
32
|
+
*/
|
|
33
|
+
HTTPUserName: string;
|
|
34
|
+
/**
|
|
35
|
+
* Return or set the HTTP Port.
|
|
36
|
+
*/
|
|
37
|
+
HTTPPort: number;
|
|
38
|
+
/**
|
|
39
|
+
* Return or set whether to use SSL in HTTP requests.
|
|
40
|
+
*/
|
|
41
|
+
IfSSL: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Return the response string of the latest HTTP Post request.
|
|
44
|
+
*/
|
|
45
|
+
readonly HTTPPostResponseString: string;
|
|
46
|
+
/**
|
|
47
|
+
* Return or set whether to show open/save file dialog when saving images in the buffer or loading images from a local directory.
|
|
48
|
+
*/
|
|
49
|
+
IfShowFileDialog: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Return or set whether to show the progress of an operation with a button to cancel it.
|
|
52
|
+
*/
|
|
53
|
+
IfShowCancelDialogWhenImageTransfer: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Return or set whether to show the progressbar.
|
|
56
|
+
*/
|
|
57
|
+
IfShowProgressBar: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Return or set the quality for JPEG compression.
|
|
60
|
+
* The values range from 0 to 100.
|
|
61
|
+
*/
|
|
62
|
+
JPEGQuality: number;
|
|
63
|
+
/**
|
|
64
|
+
* Return or set whether to insert or append images when they are scanned/loaded.
|
|
65
|
+
*/
|
|
66
|
+
IfAppendImage: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Return or set whether to append to or replace an existing TIFF file with the same name.
|
|
69
|
+
*/
|
|
70
|
+
IfTiffMultiPage: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Return or set the compression type for TIFF files.
|
|
73
|
+
*/
|
|
74
|
+
TIFFCompressionType: Dynamsoft.EnumDWT_TIFFCompressionType | number;
|
|
75
|
+
/**
|
|
76
|
+
* Return or set the name of the person who creates the PDF document.
|
|
77
|
+
*/
|
|
78
|
+
PDFAuthor: string;
|
|
79
|
+
/**
|
|
80
|
+
* Return or set the compression type of PDF files. This is a runtime property.
|
|
81
|
+
*/
|
|
82
|
+
PDFCompressionType: Dynamsoft.EnumDWT_PDFCompressionType;
|
|
83
|
+
/**
|
|
84
|
+
* Return or set the date when the PDF document is created.
|
|
85
|
+
*/
|
|
86
|
+
PDFCreationDate: string;
|
|
87
|
+
/**
|
|
88
|
+
* Return or set the name of the application that created the original document, if the PDF document is converted from another form.
|
|
89
|
+
*/
|
|
90
|
+
PDFCreator: string;
|
|
91
|
+
/**
|
|
92
|
+
* Return or set the keywords associated with the PDF document.
|
|
93
|
+
*/
|
|
94
|
+
PDFKeywords: string;
|
|
95
|
+
/**
|
|
96
|
+
* Return or set the date when the PDF document is last modified.
|
|
97
|
+
*/
|
|
98
|
+
PDFModifiedDate: string;
|
|
99
|
+
/**
|
|
100
|
+
* Return or set the name of the application that converted the PDF document from its native.
|
|
101
|
+
*/
|
|
102
|
+
PDFProducer: string;
|
|
103
|
+
/**
|
|
104
|
+
* Return or set the subject of the PDF document.
|
|
105
|
+
*/
|
|
106
|
+
PDFSubject: string;
|
|
107
|
+
/**
|
|
108
|
+
* Return or set the title of the PDF document.
|
|
109
|
+
*/
|
|
110
|
+
PDFTitle: string;
|
|
111
|
+
/**
|
|
112
|
+
* Return or set the value of the PDF version.
|
|
113
|
+
*/
|
|
114
|
+
PDFVersion: string;
|
|
115
|
+
/**
|
|
116
|
+
* Clear all the custom fields from the HTTP Post Form.
|
|
117
|
+
*/
|
|
118
|
+
ClearAllHTTPFormField(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Clear the content of all custom tiff tags.
|
|
121
|
+
*/
|
|
122
|
+
ClearTiffCustomTag(): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Convert the specified images to a base64 string.
|
|
125
|
+
* @param indices Specify one or multiple images.
|
|
126
|
+
* @param type The file type.
|
|
127
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
128
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
129
|
+
* @argument result The resulting base64 string.
|
|
130
|
+
* @argument indices The indices of the converted images.
|
|
131
|
+
* @argument type The file type.
|
|
132
|
+
* @argument errorCode The error code.
|
|
133
|
+
* @argument errorString The error string.
|
|
134
|
+
*/
|
|
135
|
+
ConvertToBase64(
|
|
136
|
+
indices: number[],
|
|
137
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
138
|
+
successCallback: (
|
|
139
|
+
result: Base64Result,
|
|
140
|
+
indices: number[],
|
|
141
|
+
type: number) => void,
|
|
142
|
+
failureCallBack: (
|
|
143
|
+
errorCode: number,
|
|
144
|
+
errorString: string) => void
|
|
145
|
+
): void;
|
|
146
|
+
/**
|
|
147
|
+
* Convert the specified images to a blob.
|
|
148
|
+
* @param indices Specify one or multiple images.
|
|
149
|
+
* @param type The file type.
|
|
150
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
151
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
152
|
+
* @argument result The resulting blob.
|
|
153
|
+
* @argument indices The indices of the converted images.
|
|
154
|
+
* @argument type The file type.
|
|
155
|
+
* @argument errorCode The error code.
|
|
156
|
+
* @argument errorString The error string.
|
|
157
|
+
*/
|
|
158
|
+
ConvertToBlob(
|
|
159
|
+
indices: number[],
|
|
160
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
161
|
+
successCallback: (
|
|
162
|
+
result: Blob,
|
|
163
|
+
indices: number[],
|
|
164
|
+
type: number) => void,
|
|
165
|
+
failureCallBack: (
|
|
166
|
+
errorCode: number,
|
|
167
|
+
errorString: string) => void
|
|
168
|
+
): void;
|
|
169
|
+
/**
|
|
170
|
+
* Download the specified file via FTP
|
|
171
|
+
* @param host The FTP Host.
|
|
172
|
+
* @param path Specify the file to download.
|
|
173
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
174
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
175
|
+
* @argument errorCode The error code.
|
|
176
|
+
* @argument errorString The error string.
|
|
177
|
+
*/
|
|
178
|
+
FTPDownload(
|
|
179
|
+
host: string,
|
|
180
|
+
path: string,
|
|
181
|
+
successCallback: () => void,
|
|
182
|
+
failureCallBack: (
|
|
183
|
+
errorCode: number,
|
|
184
|
+
errorString: string) => void
|
|
185
|
+
): void;
|
|
186
|
+
/**
|
|
187
|
+
* Download the specified file via FTP.
|
|
188
|
+
* @param host The FTP Host.
|
|
189
|
+
* @param path Specify the file to download.
|
|
190
|
+
* @param type The format of the file.
|
|
191
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
192
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
193
|
+
* @argument errorCode The error code.
|
|
194
|
+
* @argument errorString The error string.
|
|
195
|
+
*/
|
|
196
|
+
FTPDownloadEx(
|
|
197
|
+
host: string,
|
|
198
|
+
path: string,
|
|
199
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
200
|
+
successCallback: () => void,
|
|
201
|
+
failureCallBack: (
|
|
202
|
+
errorCode: number,
|
|
203
|
+
errorString: string) => void
|
|
204
|
+
): void;
|
|
205
|
+
/**
|
|
206
|
+
* Upload the specified image via FTP.
|
|
207
|
+
* @param host The FTP Host.
|
|
208
|
+
* @param index Specify the image.
|
|
209
|
+
* @param path The path to save the file.
|
|
210
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
211
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
212
|
+
* @argument errorCode The error code.
|
|
213
|
+
* @argument errorString The error string.
|
|
214
|
+
*/
|
|
215
|
+
FTPUpload(
|
|
216
|
+
host: string,
|
|
217
|
+
index: number,
|
|
218
|
+
path: string,
|
|
219
|
+
successCallback: () => void,
|
|
220
|
+
failureCallback: (
|
|
221
|
+
errorCode: number,
|
|
222
|
+
errorString: string) => void
|
|
223
|
+
): void;
|
|
224
|
+
/**
|
|
225
|
+
* Upload the specified image via FTP.
|
|
226
|
+
* @param host The FTP Host.
|
|
227
|
+
* @param index Specify the image.
|
|
228
|
+
* @param path The path to save the file.
|
|
229
|
+
* @param type The format of the file.
|
|
230
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
231
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
232
|
+
* @argument errorCode The error code.
|
|
233
|
+
* @argument errorString The error string.
|
|
234
|
+
*/
|
|
235
|
+
FTPUploadEx(
|
|
236
|
+
host: string,
|
|
237
|
+
index: number,
|
|
238
|
+
path: string,
|
|
239
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
240
|
+
successCallback: () => void,
|
|
241
|
+
failureCallback: (
|
|
242
|
+
errorCode: number,
|
|
243
|
+
errorString: string) => void
|
|
244
|
+
): void;
|
|
245
|
+
/**
|
|
246
|
+
* Upload all images as a multi-page TIFF via FTP.
|
|
247
|
+
* @param host The FTP Host.
|
|
248
|
+
* @param path Specify the path to save the file.
|
|
249
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
250
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
251
|
+
* @argument errorCode The error code.
|
|
252
|
+
* @argument errorString The error string.
|
|
253
|
+
*/
|
|
254
|
+
FTPUploadAllAsMultiPageTIFF(
|
|
255
|
+
host: string,
|
|
256
|
+
path: string,
|
|
257
|
+
successCallback: () => void,
|
|
258
|
+
failureCallback: (
|
|
259
|
+
errorCode: number,
|
|
260
|
+
errorString: string) => void
|
|
261
|
+
): void;
|
|
262
|
+
/**
|
|
263
|
+
* Upload all images as a multi-page PDF via FTP.
|
|
264
|
+
* @param host The FTP Host.
|
|
265
|
+
* @param path Specify the path to save the file.
|
|
266
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
267
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
268
|
+
* @argument errorCode The error code.
|
|
269
|
+
* @argument errorString The error string.
|
|
270
|
+
*/
|
|
271
|
+
FTPUploadAllAsPDF(
|
|
272
|
+
host: string,
|
|
273
|
+
path: string,
|
|
274
|
+
successCallback: () => void,
|
|
275
|
+
failureCallback: (
|
|
276
|
+
errorCode: number,
|
|
277
|
+
errorString: string) => void
|
|
278
|
+
): void;
|
|
279
|
+
/**
|
|
280
|
+
* Upload selected images as a multi-page PDF via FTP.
|
|
281
|
+
* @param host The FTP Host.
|
|
282
|
+
* @param path Specify the path to save the file.
|
|
283
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
284
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
285
|
+
* @argument errorCode The error code.
|
|
286
|
+
* @argument errorString The error string.
|
|
287
|
+
*/
|
|
288
|
+
FTPUploadAsMultiPagePDF(
|
|
289
|
+
host: string,
|
|
290
|
+
path: string,
|
|
291
|
+
successCallback: () => void,
|
|
292
|
+
failureCallback: (
|
|
293
|
+
errorCode: number,
|
|
294
|
+
errorString: string) => void
|
|
295
|
+
): void;
|
|
296
|
+
/**
|
|
297
|
+
* Upload selected images as a multi-page TIFF via FTP.
|
|
298
|
+
* @param host The FTP Host.
|
|
299
|
+
* @param path Specify the path to save the file.
|
|
300
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
301
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
302
|
+
* @argument errorCode The error code.
|
|
303
|
+
* @argument errorString The error string.
|
|
304
|
+
*/
|
|
305
|
+
FTPUploadAsMultiPageTIFF(
|
|
306
|
+
host: string,
|
|
307
|
+
path: string,
|
|
308
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
309
|
+
successCallback: () => void,
|
|
310
|
+
failureCallback: (
|
|
311
|
+
errorCode: number,
|
|
312
|
+
errorString: string) => void
|
|
313
|
+
): void;
|
|
314
|
+
/**
|
|
315
|
+
* Download the specified file via a HTTP Get request.
|
|
316
|
+
* @param host The HTTP Host.
|
|
317
|
+
* @param path Specify the path of the file to download.
|
|
318
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
319
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
320
|
+
* @argument errorCode The error code.
|
|
321
|
+
* @argument errorString The error string.
|
|
322
|
+
*/
|
|
323
|
+
HTTPDownload(
|
|
324
|
+
host: string,
|
|
325
|
+
path: string,
|
|
326
|
+
successCallback: () => void,
|
|
327
|
+
failureCallback: (
|
|
328
|
+
errorCode: number,
|
|
329
|
+
errorString: string) => void
|
|
330
|
+
): void;
|
|
331
|
+
/**
|
|
332
|
+
* Download the specified file via a HTTP Get request.
|
|
333
|
+
* @param host The HTTP Host.
|
|
334
|
+
* @param path Specify the path of the file to download.
|
|
335
|
+
* @param type The format of the file.
|
|
336
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
337
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
338
|
+
* @argument errorCode The error code.
|
|
339
|
+
* @argument errorString The error string.
|
|
340
|
+
*/
|
|
341
|
+
HTTPDownloadEx(
|
|
342
|
+
host: string,
|
|
343
|
+
path: string,
|
|
344
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
345
|
+
successCallback: () => void,
|
|
346
|
+
failureCallback: (
|
|
347
|
+
errorCode: number,
|
|
348
|
+
errorString: string) => void
|
|
349
|
+
): void;
|
|
350
|
+
/**
|
|
351
|
+
* Download the specified file via a HTTP Post request.
|
|
352
|
+
* @param host The HTTP Host.
|
|
353
|
+
* @param path Specify the path of the file to download.
|
|
354
|
+
* @param type The format of the file.
|
|
355
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
356
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
357
|
+
* @argument errorCode The error code.
|
|
358
|
+
* @argument errorString The error string.
|
|
359
|
+
* @argument response The response string.
|
|
360
|
+
*/
|
|
361
|
+
HTTPDownloadThroughPost(
|
|
362
|
+
host: string,
|
|
363
|
+
path: string,
|
|
364
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
365
|
+
onEmptyResponse: () => void,
|
|
366
|
+
onServerReturnedSomething: (
|
|
367
|
+
errorCode: number,
|
|
368
|
+
errorString: string,
|
|
369
|
+
response: string) => void
|
|
370
|
+
): void;
|
|
371
|
+
/**
|
|
372
|
+
* Download the specified file via a HTTP Get request.
|
|
373
|
+
* @param host The HTTP Host.
|
|
374
|
+
* @param path Specify the path of the file to download.
|
|
375
|
+
* @param localPath Specify where to save the file.
|
|
376
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
377
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
378
|
+
* @argument errorCode The error code.
|
|
379
|
+
* @argument errorString The error string.
|
|
380
|
+
*/
|
|
381
|
+
HTTPDownloadDirectly(
|
|
382
|
+
host: string,
|
|
383
|
+
path: string,
|
|
384
|
+
localPath: string,
|
|
385
|
+
successCallback: () => void,
|
|
386
|
+
failureCallback: (
|
|
387
|
+
errorCode: number,
|
|
388
|
+
errorString: string) => void
|
|
389
|
+
): void;
|
|
390
|
+
/**
|
|
391
|
+
* Upload the specified image(s) via a HTTP Post.
|
|
392
|
+
* @param URL The server-side script to receive the post.
|
|
393
|
+
* @param indices Specify the image(s).
|
|
394
|
+
* @param type The format of the file.
|
|
395
|
+
* @param dataFormat Whether to upload the file as binary or a base64 string.
|
|
396
|
+
* @param fileName The file name.
|
|
397
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
398
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
399
|
+
* @argument errorCode The error code.
|
|
400
|
+
* @argument errorString The error string.
|
|
401
|
+
* @argument response The response string.
|
|
402
|
+
*/
|
|
403
|
+
HTTPUpload(
|
|
404
|
+
URL: string,
|
|
405
|
+
indices: number[],
|
|
406
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
407
|
+
dataFormat: Dynamsoft.EnumDWT_UploadDataFormat | number,
|
|
408
|
+
fileName: string,
|
|
409
|
+
onEmptyResponse: () => void,
|
|
410
|
+
onServerReturnedSomething: (
|
|
411
|
+
errorCode: number,
|
|
412
|
+
errorString: string,
|
|
413
|
+
response: string) => void
|
|
414
|
+
): void;
|
|
415
|
+
HTTPUpload(
|
|
416
|
+
URL: string,
|
|
417
|
+
indices: number[],
|
|
418
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
419
|
+
dataFormat: Dynamsoft.EnumDWT_UploadDataFormat | number,
|
|
420
|
+
onEmptyResponse: () => void,
|
|
421
|
+
onServerReturnedSomething: (
|
|
422
|
+
errorCode: number,
|
|
423
|
+
errorString: string,
|
|
424
|
+
response: string) => void
|
|
425
|
+
): void;
|
|
426
|
+
HTTPUpload(
|
|
427
|
+
URL: string,
|
|
428
|
+
onEmptyResponse: () => void,
|
|
429
|
+
onServerReturnedSomething: (
|
|
430
|
+
errorCode: number,
|
|
431
|
+
errorString: string,
|
|
432
|
+
response: string) => void
|
|
433
|
+
): void;
|
|
434
|
+
/**
|
|
435
|
+
* Upload the specified image via a HTTP Put request.
|
|
436
|
+
* @param host The HTTP Host.
|
|
437
|
+
* @param index Specify the image.
|
|
438
|
+
* @param path Specify the path to put the file.
|
|
439
|
+
* @param type The format of the file.
|
|
440
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
441
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
442
|
+
* @argument errorCode The error code.
|
|
443
|
+
* @argument errorString The error string.
|
|
444
|
+
*/
|
|
445
|
+
HTTPUploadThroughPutEx(
|
|
446
|
+
host: string,
|
|
447
|
+
index: number,
|
|
448
|
+
path: string,
|
|
449
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
450
|
+
successCallback: () => void,
|
|
451
|
+
failureCallback: (
|
|
452
|
+
errorCode: number,
|
|
453
|
+
errorString: string) => void
|
|
454
|
+
): void;
|
|
455
|
+
/**
|
|
456
|
+
* Upload the specified image via a HTTP Post request.
|
|
457
|
+
* @param host The HTTP Host.
|
|
458
|
+
* @param index Specify the image.
|
|
459
|
+
* @param target The target wherethe request is sent.
|
|
460
|
+
* @param type The format of the file.
|
|
461
|
+
* @param fileName The file name.
|
|
462
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
463
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
464
|
+
* @argument errorCode The error code.
|
|
465
|
+
* @argument errorString The error string.
|
|
466
|
+
* @argument response The response string.
|
|
467
|
+
*/
|
|
468
|
+
HTTPUploadThroughPost(
|
|
469
|
+
host: string,
|
|
470
|
+
index: number,
|
|
471
|
+
target: string,
|
|
472
|
+
fileName: string,
|
|
473
|
+
onEmptyResponse: () => void,
|
|
474
|
+
onServerReturnedSomething: (
|
|
475
|
+
errorCode: number,
|
|
476
|
+
errorString: string,
|
|
477
|
+
response: string) => void
|
|
478
|
+
): void;
|
|
479
|
+
/**
|
|
480
|
+
* Upload the specified image via a HTTP Post request.
|
|
481
|
+
* @param host The HTTP Host.
|
|
482
|
+
* @param index Specify the image.
|
|
483
|
+
* @param target The target wherethe request is sent.
|
|
484
|
+
* @param fileName The file name.
|
|
485
|
+
* @param type The format of the file.
|
|
486
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
487
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
488
|
+
* @argument errorCode The error code.
|
|
489
|
+
* @argument errorString The error string.
|
|
490
|
+
* @argument response The response string.
|
|
491
|
+
*/
|
|
492
|
+
HTTPUploadThroughPostEx(
|
|
493
|
+
host: string,
|
|
494
|
+
index: number,
|
|
495
|
+
target: string,
|
|
496
|
+
fileName: string,
|
|
497
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
498
|
+
onEmptyResponse: () => void,
|
|
499
|
+
onServerReturnedSomething: (
|
|
500
|
+
errorCode: number,
|
|
501
|
+
errorString: string,
|
|
502
|
+
response: string) => void
|
|
503
|
+
): void;
|
|
504
|
+
/**
|
|
505
|
+
* Upload all images in the buffer as a TIFF file via a HTTP Post request.
|
|
506
|
+
* @param host The HTTP Host.
|
|
507
|
+
* @param target The target wherethe request is sent.
|
|
508
|
+
* @param fileName The file name.
|
|
509
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
510
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
511
|
+
* @argument errorCode The error code.
|
|
512
|
+
* @argument errorString The error string.
|
|
513
|
+
* @argument response The response string.
|
|
514
|
+
*/
|
|
515
|
+
HTTPUploadAllThroughPostAsMultiPageTIFF(
|
|
516
|
+
host: string,
|
|
517
|
+
target: string,
|
|
518
|
+
fileName: string,
|
|
519
|
+
onEmptyResponse: () => void,
|
|
520
|
+
onServerReturnedSomething: (
|
|
521
|
+
errorCode: number,
|
|
522
|
+
errorString: string,
|
|
523
|
+
response: string) => void
|
|
524
|
+
): void;
|
|
525
|
+
/**
|
|
526
|
+
* Upload all images in the buffer as a PDF file via a HTTP Post request.
|
|
527
|
+
* @param host The HTTP Host.
|
|
528
|
+
* @param target The target wherethe request is sent.
|
|
529
|
+
* @param fileName The file name.
|
|
530
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
531
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
532
|
+
* @argument errorCode The error code.
|
|
533
|
+
* @argument errorString The error string.
|
|
534
|
+
* @argument response The response string.
|
|
535
|
+
*/
|
|
536
|
+
HTTPUploadAllThroughPostAsPDF(
|
|
537
|
+
host: string,
|
|
538
|
+
target: string,
|
|
539
|
+
fileName: string,
|
|
540
|
+
onEmptyResponse: () => void,
|
|
541
|
+
onServerReturnedSomething: (
|
|
542
|
+
errorCode: number,
|
|
543
|
+
errorString: string,
|
|
544
|
+
response: string) => void
|
|
545
|
+
): void;
|
|
546
|
+
/**
|
|
547
|
+
* Upload all selected images in the buffer as a PDF file via a HTTP Post request.
|
|
548
|
+
* @param host The HTTP Host.
|
|
549
|
+
* @param target The target wherethe request is sent.
|
|
550
|
+
* @param fileName The file name.
|
|
551
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
552
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
553
|
+
* @argument errorCode The error code.
|
|
554
|
+
* @argument errorString The error string.
|
|
555
|
+
* @argument response The response string.
|
|
556
|
+
*/
|
|
557
|
+
HTTPUploadThroughPostAsMultiPagePDF(
|
|
558
|
+
host: string,
|
|
559
|
+
target: string,
|
|
560
|
+
fileName: string,
|
|
561
|
+
onEmptyResponse: () => void,
|
|
562
|
+
onServerReturnedSomething: (
|
|
563
|
+
errorCode: number,
|
|
564
|
+
errorString: string,
|
|
565
|
+
response: string) => void
|
|
566
|
+
): void;
|
|
567
|
+
/**
|
|
568
|
+
* Upload all selected images in the buffer as a TIFF file via a HTTP Post request.
|
|
569
|
+
* @param host The HTTP Host.
|
|
570
|
+
* @param target The target wherethe request is sent.
|
|
571
|
+
* @param fileName The file name.
|
|
572
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
573
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
574
|
+
* @argument errorCode The error code.
|
|
575
|
+
* @argument errorString The error string.
|
|
576
|
+
* @argument response The response string.
|
|
577
|
+
*/
|
|
578
|
+
HTTPUploadThroughPostAsMultiPageTIFF(
|
|
579
|
+
host: string,
|
|
580
|
+
target: string,
|
|
581
|
+
fileName: string,
|
|
582
|
+
onEmptyResponse: () => void,
|
|
583
|
+
onServerReturnedSomething: (
|
|
584
|
+
errorCode: number,
|
|
585
|
+
errorString: string,
|
|
586
|
+
response: string) => void
|
|
587
|
+
): void;
|
|
588
|
+
/**
|
|
589
|
+
* Upload the specified file via a HTTP Post request.
|
|
590
|
+
* @param host The HTTP Host.
|
|
591
|
+
* @param path Specify the file to upload.
|
|
592
|
+
* @param target The target wherethe request is sent.
|
|
593
|
+
* @param fileName The file name.
|
|
594
|
+
* @param onEmptyResponse A callback function that is executed if the response is empty.
|
|
595
|
+
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
|
|
596
|
+
* @argument errorCode The error code.
|
|
597
|
+
* @argument errorString The error string.
|
|
598
|
+
* @argument response The response string.
|
|
599
|
+
*/
|
|
600
|
+
HTTPUploadThroughPostDirectly(
|
|
601
|
+
host: string,
|
|
602
|
+
path: string,
|
|
603
|
+
target: string,
|
|
604
|
+
fileName: string,
|
|
605
|
+
onEmptyResponse: () => void,
|
|
606
|
+
onServerReturnedSomething: (
|
|
607
|
+
errorCode: number,
|
|
608
|
+
errorString: string,
|
|
609
|
+
response: string) => void
|
|
610
|
+
): void;
|
|
611
|
+
/**
|
|
612
|
+
* Load image(s) specified by its absolute path.
|
|
613
|
+
* @param fileName The path of the image to load.
|
|
614
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
615
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
616
|
+
* @argument errorCode The error code.
|
|
617
|
+
* @argument errorString The error string.
|
|
618
|
+
*/
|
|
619
|
+
LoadImage(
|
|
620
|
+
fileName: string,
|
|
621
|
+
successCallback?: () => void,
|
|
622
|
+
failureCallback?: (
|
|
623
|
+
errorCode: number,
|
|
624
|
+
errorString: string) => void
|
|
625
|
+
): void | boolean;
|
|
626
|
+
/**
|
|
627
|
+
* Load image(s) specified by its absolute path.
|
|
628
|
+
* @param fileName The path of the image to load.
|
|
629
|
+
* @param type The format of the image.
|
|
630
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
631
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
632
|
+
* @argument errorCode The error code.
|
|
633
|
+
* @argument errorString The error string.
|
|
634
|
+
*/
|
|
635
|
+
LoadImageEx(
|
|
636
|
+
fileName: string,
|
|
637
|
+
type: Dynamsoft.EnumDWT_ImageType | number,
|
|
638
|
+
successCallback?: () => void,
|
|
639
|
+
failureCallback?: (
|
|
640
|
+
errorCode: number,
|
|
641
|
+
errorString: string) => void
|
|
642
|
+
): void | boolean;
|
|
643
|
+
/**
|
|
644
|
+
* Load image(s) from a base64 string.
|
|
645
|
+
* @param imageData The image data which is a base64 string without the data URI scheme.
|
|
646
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
647
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
648
|
+
* @argument errorCode The error code.
|
|
649
|
+
* @argument errorString The error string.
|
|
650
|
+
*/
|
|
651
|
+
LoadImageFromBase64Binary(
|
|
652
|
+
imageData: string,
|
|
653
|
+
imageType: Dynamsoft.EnumDWT_ImageType,
|
|
654
|
+
successCallback?: () => void,
|
|
655
|
+
failureCallback?: (
|
|
656
|
+
errorCode: number,
|
|
657
|
+
errorString: string) => void
|
|
658
|
+
): void | boolean;
|
|
659
|
+
/**
|
|
660
|
+
* Load image(s) from a binary object (Blob | ArrayBuffer).
|
|
661
|
+
* @param imageData The image data.
|
|
662
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
663
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
664
|
+
* @argument errorCode The error code.
|
|
665
|
+
* @argument errorString The error string.
|
|
666
|
+
*/
|
|
667
|
+
LoadImageFromBinary(
|
|
668
|
+
imageData: Blob | ArrayBuffer,
|
|
669
|
+
successCallback: () => void,
|
|
670
|
+
failureCallback: (
|
|
671
|
+
errorCode: number,
|
|
672
|
+
errorString: string) => void
|
|
673
|
+
): void;
|
|
674
|
+
/**
|
|
675
|
+
* Load an image from the system clipboard. The image must be in DIB format.
|
|
676
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
677
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
678
|
+
* @argument errorCode The error code.
|
|
679
|
+
* @argument errorString The error string.
|
|
680
|
+
*/
|
|
681
|
+
LoadDibFromClipboard(
|
|
682
|
+
successCallback?: () => void,
|
|
683
|
+
failureCallback?: (
|
|
684
|
+
errorCode: number,
|
|
685
|
+
errorString: string) => void
|
|
686
|
+
): void | boolean;
|
|
687
|
+
/**
|
|
688
|
+
* [Deprecation] Return or set how many threads can be used when you upload files through POST.
|
|
689
|
+
*/
|
|
690
|
+
MaxInternetTransferThreads: number;
|
|
691
|
+
/**
|
|
692
|
+
* Return or set the maximum allowed size of a file to upload (in bytes).
|
|
693
|
+
*/
|
|
694
|
+
MaxUploadImageSize: number;
|
|
695
|
+
/**
|
|
696
|
+
* Export all image data in the buffer to a new browser window and use the browser's built-in print feature to print the image(s).
|
|
697
|
+
* @param useOSPrintWindow Whether to use the print feature of the operating system instead.
|
|
698
|
+
*/
|
|
699
|
+
Print(useOSPrintWindow?: boolean): boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Save the specified image as a BMP file.
|
|
702
|
+
* @param fileName The name to save to.
|
|
703
|
+
* @param index The index which specifies the image to save.
|
|
704
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
705
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
706
|
+
* @argument errorCode The error code.
|
|
707
|
+
* @argument errorString The error string.
|
|
708
|
+
*/
|
|
709
|
+
SaveAsBMP(
|
|
710
|
+
fileName: string,
|
|
711
|
+
index: number,
|
|
712
|
+
successCallback?: () => void,
|
|
713
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
714
|
+
): void | boolean;
|
|
715
|
+
/**
|
|
716
|
+
* Save the specified image as a JPEG file.
|
|
717
|
+
* @param fileName The name to save to.
|
|
718
|
+
* @param index The index which specifies the image to save.
|
|
719
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
720
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
721
|
+
* @argument errorCode The error code.
|
|
722
|
+
* @argument errorString The error string.
|
|
723
|
+
*/
|
|
724
|
+
SaveAsJPEG(
|
|
725
|
+
fileName: string,
|
|
726
|
+
index: number,
|
|
727
|
+
successCallback?: () => void,
|
|
728
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
729
|
+
): void | boolean;
|
|
730
|
+
/**
|
|
731
|
+
* Save the specified image as a PDF file.
|
|
732
|
+
* @param fileName The name to save to.
|
|
733
|
+
* @param index The index which specifies the image to save.
|
|
734
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
735
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
736
|
+
* @argument errorCode The error code.
|
|
737
|
+
* @argument errorString The error string.
|
|
738
|
+
*/
|
|
739
|
+
SaveAsPDF(
|
|
740
|
+
fileName: string,
|
|
741
|
+
index: number,
|
|
742
|
+
successCallback?: () => void,
|
|
743
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
744
|
+
): void | boolean;
|
|
745
|
+
/**
|
|
746
|
+
* Save the specified image as a PNG file.
|
|
747
|
+
* @param fileName The name to save to.
|
|
748
|
+
* @param index The index which specifies the image to save.
|
|
749
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
750
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
751
|
+
* @argument errorCode The error code.
|
|
752
|
+
* @argument errorString The error string.
|
|
753
|
+
*/
|
|
754
|
+
SaveAsPNG(
|
|
755
|
+
fileName: string,
|
|
756
|
+
index: number,
|
|
757
|
+
successCallback?: () => void,
|
|
758
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
759
|
+
): void | boolean;
|
|
760
|
+
/**
|
|
761
|
+
* Save the specified image as a TIFF file.
|
|
762
|
+
* @param fileName The name to save to.
|
|
763
|
+
* @param index The index which specifies the image to save.
|
|
764
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
765
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
766
|
+
* @argument errorCode The error code.
|
|
767
|
+
* @argument errorString The error string.
|
|
768
|
+
*/
|
|
769
|
+
SaveAsTIFF(
|
|
770
|
+
fileName: string,
|
|
771
|
+
index: number,
|
|
772
|
+
successCallback?: () => void,
|
|
773
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
774
|
+
): void | boolean;
|
|
775
|
+
/**
|
|
776
|
+
* Saves all the images in buffer as a multi-page TIFF file.
|
|
777
|
+
* @param fileName The name to save to.
|
|
778
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
779
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
780
|
+
* @argument errorCode The error code.
|
|
781
|
+
* @argument errorString The error string.
|
|
782
|
+
*/
|
|
783
|
+
SaveAllAsMultiPageTIFF(
|
|
784
|
+
fileName: string,
|
|
785
|
+
successCallback?: () => void,
|
|
786
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
787
|
+
): void | boolean;
|
|
788
|
+
/**
|
|
789
|
+
* Saves all the images in buffer as a multi-page PDF file.
|
|
790
|
+
* @param fileName The name to save to.
|
|
791
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
792
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
793
|
+
* @argument errorCode The error code.
|
|
794
|
+
* @argument errorString The error string.
|
|
795
|
+
*/
|
|
796
|
+
SaveAllAsPDF(
|
|
797
|
+
fileName: string,
|
|
798
|
+
successCallback?: () => void,
|
|
799
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
800
|
+
): void | boolean;
|
|
801
|
+
/**
|
|
802
|
+
* Saves all selected images in buffer as a multi-page PDF file.
|
|
803
|
+
* @param fileName The name to save to.
|
|
804
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
805
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
806
|
+
* @argument errorCode The error code.
|
|
807
|
+
* @argument errorString The error string.
|
|
808
|
+
*/
|
|
809
|
+
SaveSelectedImagesAsMultiPagePDF(
|
|
810
|
+
fileName: string,
|
|
811
|
+
successCallback?: () => void,
|
|
812
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
813
|
+
): void | boolean;
|
|
814
|
+
/**
|
|
815
|
+
* Saves all selected images in buffer as a multi-page TIFF file.
|
|
816
|
+
* @param fileName The name to save to.
|
|
817
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
818
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
819
|
+
* @argument errorCode The error code.
|
|
820
|
+
* @argument errorString The error string.
|
|
821
|
+
*/
|
|
822
|
+
SaveSelectedImagesAsMultiPageTIFF(
|
|
823
|
+
fileName: string,
|
|
824
|
+
successCallback?: () => void,
|
|
825
|
+
failureCallback?: (
|
|
826
|
+
errorCode: number,
|
|
827
|
+
errorString: string) => void
|
|
828
|
+
): void | boolean;
|
|
829
|
+
/**
|
|
830
|
+
* [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
|
|
831
|
+
* [Alternative] Read SelectedImagesIndices instead.
|
|
832
|
+
* @param indexOfIndices Specify the index of the specified image.
|
|
833
|
+
*/
|
|
834
|
+
SaveSelectedImagesToBase64Binary(indexOfIndices: number): number;
|
|
835
|
+
/**
|
|
836
|
+
* [Deprecation] Saves the selected images in the buffer to a base64 string.
|
|
837
|
+
* [Alternative] Use ConvertToBase64 instead.
|
|
838
|
+
* @param successCallback A callback function that is executed if the request succeeds.
|
|
839
|
+
* @param failureCallback A callback function that is executed if the request fails.
|
|
840
|
+
* @argument result The resulting array of strings.
|
|
841
|
+
* @argument errorCode The error code.
|
|
842
|
+
* @argument errorString The error string.
|
|
843
|
+
*/
|
|
844
|
+
SaveSelectedImagesToBase64Binary(
|
|
845
|
+
successCallback?: (result: string[]) => void,
|
|
846
|
+
failureCallback?: (errorCode: number, errorString: string) => void
|
|
847
|
+
): string | boolean;
|
|
848
|
+
/**
|
|
849
|
+
* Add a custom field to the HTTP Post Form.
|
|
850
|
+
* @param name The name of the field.
|
|
851
|
+
* @param value The value of the field.
|
|
852
|
+
*/
|
|
853
|
+
SetHTTPFormField(
|
|
854
|
+
name: string,
|
|
855
|
+
value: string
|
|
856
|
+
): boolean;
|
|
857
|
+
/**
|
|
858
|
+
* Add a binary file to the HTTP Post Form.
|
|
859
|
+
* @param name The name of the field.
|
|
860
|
+
* @param content The content of the file.
|
|
861
|
+
* @param fileName The name of the file.
|
|
862
|
+
*/
|
|
863
|
+
SetHTTPFormField(
|
|
864
|
+
name: string,
|
|
865
|
+
content: Blob,
|
|
866
|
+
fileName?: string
|
|
867
|
+
): boolean;
|
|
868
|
+
/**
|
|
869
|
+
* Add a custom header to the HTTP Post Form.
|
|
870
|
+
* @param name The name of the field.
|
|
871
|
+
* @param value The value of the field.
|
|
872
|
+
*/
|
|
873
|
+
SetHTTPHeader(
|
|
874
|
+
name: string,
|
|
875
|
+
value: string
|
|
876
|
+
): boolean;
|
|
877
|
+
/**
|
|
878
|
+
* Clear the content of all custom tiff tags.
|
|
879
|
+
* @param id The id of the custom tag.
|
|
880
|
+
* @param content The content of the tag.
|
|
881
|
+
* @param useBase64Encoding Whether the content is encoded.
|
|
882
|
+
*/
|
|
883
|
+
SetTiffCustomTag(
|
|
884
|
+
id: number,
|
|
885
|
+
content: string,
|
|
886
|
+
useBase64Encoding: boolean
|
|
887
|
+
): boolean;
|
|
888
|
+
/**
|
|
889
|
+
* Set the segmentation threshold and segment size.
|
|
890
|
+
* @param threshold Specify the threshold (in MB).
|
|
891
|
+
* @param size Specify the segment size (in KB).
|
|
892
|
+
*/
|
|
893
|
+
SetUploadSegment(
|
|
894
|
+
threshold: number,
|
|
895
|
+
size: number
|
|
896
|
+
): boolean;
|
|
897
|
+
/**
|
|
898
|
+
* Show the system's save-file dialog or open-file dialog.
|
|
899
|
+
* @param isSave Whether to show a save-file dialog or an open-file dialog
|
|
900
|
+
* @param filter The filter pattern like "JPG | *.jpg".
|
|
901
|
+
* @param filterIndex The order of the filter. Normally, just put 0.
|
|
902
|
+
* @param defaultExtension Extension to be appended to the file name. Only valid in a save-file dialog
|
|
903
|
+
* @param initialDirectory The initial directory that the dialog opens.
|
|
904
|
+
* @param allowMultiSelect Whether or not multiple files can be selected at the same time. Only valid in an open-file dialog.
|
|
905
|
+
* @param showOverwritePrompt Whether or not a prompt shows up when saving a file may overwrite an existing file.
|
|
906
|
+
* @param flag If set to 0, bAllowMultiSelect and bShowOverwritePrompt will be effective. Otherwise, these two parameters are ignored.
|
|
907
|
+
*/
|
|
908
|
+
ShowFileDialog(
|
|
909
|
+
isSave: boolean,
|
|
910
|
+
filter: string,
|
|
911
|
+
filterIndex: number,
|
|
912
|
+
defaultExtension: string,
|
|
913
|
+
initialDirectory: string,
|
|
914
|
+
allowMultiSelect: boolean,
|
|
915
|
+
showOverwritePrompt: boolean,
|
|
916
|
+
flag: number
|
|
917
|
+
): boolean;
|
|
918
|
+
/**
|
|
919
|
+
* [Deprecation] Set a cookie string into the Http Header to be used when uploading scanned images through POST.
|
|
920
|
+
* @param cookie The cookie.
|
|
921
|
+
*/
|
|
922
|
+
SetCookie(cookie: string): boolean;
|
|
923
|
+
}
|
|
924
|
+
export interface Base64Result {
|
|
925
|
+
/**
|
|
926
|
+
* Return the length of the result string.
|
|
927
|
+
*/
|
|
928
|
+
getLength(): number;
|
|
929
|
+
/**
|
|
930
|
+
* Return part of the string.
|
|
931
|
+
* @param offset The starting position.
|
|
932
|
+
* @param length The length of the expected string.
|
|
933
|
+
*/
|
|
934
|
+
getData(offset: number, length: number): string;
|
|
935
|
+
/**
|
|
936
|
+
* Return the MD5 value of the result.
|
|
937
|
+
*/
|
|
938
|
+
getMD5(): string;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Details for each license
|
|
942
|
+
*/
|
|
943
|
+
export interface LicenseDetailItem {
|
|
944
|
+
readonly Browser: string;
|
|
945
|
+
readonly EnumLicenseType: string;
|
|
946
|
+
readonly ExpireDate: string;
|
|
947
|
+
readonly LicenseType: string;
|
|
948
|
+
readonly OS: string;
|
|
949
|
+
readonly Trial: string;
|
|
950
|
+
readonly Version: string;
|
|
951
|
+
}
|