@embedpdf/models 1.0.11 → 1.0.13
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/dist/color.d.ts +21 -0
- package/dist/date.d.ts +16 -0
- package/dist/geometry.d.ts +299 -0
- package/dist/geometry.test.d.ts +1 -0
- package/dist/index.cjs +2 -1301
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -2608
- package/dist/index.js +376 -136
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +172 -0
- package/dist/logger.test.d.ts +1 -0
- package/dist/{index.d.cts → pdf.d.ts} +365 -796
- package/dist/task.d.ts +188 -0
- package/dist/task.test.d.ts +1 -0
- package/package.json +7 -9
|
@@ -1,656 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
declare enum Rotation {
|
|
6
|
-
Degree0 = 0,
|
|
7
|
-
Degree90 = 1,
|
|
8
|
-
Degree180 = 2,
|
|
9
|
-
Degree270 = 3
|
|
10
|
-
}
|
|
11
|
-
/** Clamp a Position to device-pixel integers (floor) */
|
|
12
|
-
declare function toIntPos(p: Position): Position;
|
|
13
|
-
/** Clamp a Size so it never truncates right / bottom (ceil) */
|
|
14
|
-
declare function toIntSize(s: Size): Size;
|
|
15
|
-
/** Apply both rules to a Rect */
|
|
16
|
-
declare function toIntRect(r: Rect): Rect;
|
|
17
|
-
/**
|
|
18
|
-
* Calculate degree that match the rotation type
|
|
19
|
-
* @param rotation - type of rotation
|
|
20
|
-
* @returns rotated degree
|
|
21
|
-
*
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
declare function calculateDegree(rotation: Rotation): 0 | 90 | 180 | 270;
|
|
25
|
-
/**
|
|
26
|
-
* Calculate angle that match the rotation type
|
|
27
|
-
* @param rotation - type of rotation
|
|
28
|
-
* @returns rotated angle
|
|
29
|
-
*
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
declare function calculateAngle(rotation: Rotation): number;
|
|
33
|
-
/**
|
|
34
|
-
* Represent the size of object
|
|
35
|
-
*
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
interface Size {
|
|
39
|
-
/**
|
|
40
|
-
* width of the object
|
|
41
|
-
*/
|
|
42
|
-
width: number;
|
|
43
|
-
/**
|
|
44
|
-
* height of the object
|
|
45
|
-
*/
|
|
46
|
-
height: number;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Represents a rectangle defined by its left, top, right, and bottom edges
|
|
50
|
-
*
|
|
51
|
-
* @public
|
|
52
|
-
*/
|
|
53
|
-
interface Box {
|
|
54
|
-
/**
|
|
55
|
-
* The x-coordinate of the left edge
|
|
56
|
-
*/
|
|
57
|
-
left: number;
|
|
58
|
-
/**
|
|
59
|
-
* The y-coordinate of the top edge
|
|
60
|
-
*/
|
|
61
|
-
top: number;
|
|
62
|
-
/**
|
|
63
|
-
* The x-coordinate of the right edge
|
|
64
|
-
*/
|
|
65
|
-
right: number;
|
|
66
|
-
/**
|
|
67
|
-
* The y-coordinate of the bottom edge
|
|
68
|
-
*/
|
|
69
|
-
bottom: number;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Swap the width and height of the size object
|
|
73
|
-
* @param size - the original size
|
|
74
|
-
* @returns swapped size
|
|
75
|
-
*
|
|
76
|
-
* @public
|
|
77
|
-
*/
|
|
78
|
-
declare function swap(size: Size): Size;
|
|
79
|
-
/**
|
|
80
|
-
* Transform size with specified rotation angle and scale factor
|
|
81
|
-
* @param size - orignal size of rect
|
|
82
|
-
* @param rotation - rotation angle
|
|
83
|
-
* @param scaleFactor - - scale factor
|
|
84
|
-
* @returns size that has been transformed
|
|
85
|
-
*
|
|
86
|
-
* @public
|
|
87
|
-
*/
|
|
88
|
-
declare function transformSize(size: Size, rotation: Rotation, scaleFactor: number): Size;
|
|
89
|
-
/**
|
|
90
|
-
* position of point
|
|
91
|
-
*
|
|
92
|
-
* @public
|
|
93
|
-
*/
|
|
94
|
-
interface Position {
|
|
95
|
-
/**
|
|
96
|
-
* x coordinate
|
|
97
|
-
*/
|
|
98
|
-
x: number;
|
|
99
|
-
/**
|
|
100
|
-
* y coordinate
|
|
101
|
-
*/
|
|
102
|
-
y: number;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Quadrilateral
|
|
106
|
-
*
|
|
107
|
-
* @public
|
|
108
|
-
*/
|
|
109
|
-
interface Quad {
|
|
110
|
-
p1: Position;
|
|
111
|
-
p2: Position;
|
|
112
|
-
p3: Position;
|
|
113
|
-
p4: Position;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Convert quadrilateral to rectangle
|
|
117
|
-
* @param q - quadrilateral
|
|
118
|
-
* @returns rectangle
|
|
119
|
-
*
|
|
120
|
-
* @public
|
|
121
|
-
*/
|
|
122
|
-
declare function quadToRect(q: Quad): Rect;
|
|
123
|
-
/**
|
|
124
|
-
* Convert rectangle to quadrilateral
|
|
125
|
-
* @param r - rectangle
|
|
126
|
-
* @returns quadrilateral
|
|
127
|
-
*
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
130
|
-
declare function rectToQuad(r: Rect): Quad;
|
|
131
|
-
/**
|
|
132
|
-
* Rotate the container and calculate the new position for a point
|
|
133
|
-
* in specified position
|
|
134
|
-
* @param containerSize - size of the container
|
|
135
|
-
* @param position - position of the point
|
|
136
|
-
* @param rotation - rotated angle
|
|
137
|
-
* @returns new position of the point
|
|
138
|
-
*
|
|
139
|
-
* @public
|
|
140
|
-
*/
|
|
141
|
-
declare function rotatePosition(containerSize: Size, position: Position, rotation: Rotation): Position;
|
|
142
|
-
/**
|
|
143
|
-
* Calculate the position of point by scaling the container
|
|
144
|
-
* @param position - position of the point
|
|
145
|
-
* @param scaleFactor - factor of scaling
|
|
146
|
-
* @returns new position of point
|
|
147
|
-
*
|
|
148
|
-
* @public
|
|
149
|
-
*/
|
|
150
|
-
declare function scalePosition(position: Position, scaleFactor: number): Position;
|
|
151
|
-
/**
|
|
152
|
-
* Calculate the position of the point by applying the specified transformation
|
|
153
|
-
* @param containerSize - size of container
|
|
154
|
-
* @param position - position of the point
|
|
155
|
-
* @param rotation - rotated angle
|
|
156
|
-
* @param scaleFactor - factor of scaling
|
|
157
|
-
* @returns new position of point
|
|
158
|
-
*
|
|
159
|
-
* @public
|
|
160
|
-
*/
|
|
161
|
-
declare function transformPosition(containerSize: Size, position: Position, rotation: Rotation, scaleFactor: number): Position;
|
|
162
|
-
/**
|
|
163
|
-
* Restore the position in a transformed cotainer
|
|
164
|
-
* @param containerSize - size of the container
|
|
165
|
-
* @param position - position of the point
|
|
166
|
-
* @param rotation - rotated angle
|
|
167
|
-
* @param scaleFactor - factor of scaling
|
|
168
|
-
* @returns the original position of the point
|
|
169
|
-
*
|
|
170
|
-
* @public
|
|
171
|
-
*/
|
|
172
|
-
declare function restorePosition(containerSize: Size, position: Position, rotation: Rotation, scaleFactor: number): Position;
|
|
173
|
-
/**
|
|
174
|
-
* representation of rectangle
|
|
175
|
-
*
|
|
176
|
-
* @public
|
|
177
|
-
*/
|
|
178
|
-
interface Rect {
|
|
179
|
-
/**
|
|
180
|
-
* origin of the rectangle
|
|
181
|
-
*/
|
|
182
|
-
origin: Position;
|
|
183
|
-
/**
|
|
184
|
-
* size of the rectangle
|
|
185
|
-
*/
|
|
186
|
-
size: Size;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Calculate the rect after rotated the container
|
|
190
|
-
* @param containerSize - size of container
|
|
191
|
-
* @param rect - target rect
|
|
192
|
-
* @param rotation - rotation angle
|
|
193
|
-
* @returns rotated rect
|
|
194
|
-
*
|
|
195
|
-
* @public
|
|
196
|
-
*/
|
|
197
|
-
declare function rotateRect(containerSize: Size, rect: Rect, rotation: Rotation): Rect;
|
|
198
|
-
/**
|
|
199
|
-
* Scale the rectangle
|
|
200
|
-
* @param rect - rectangle
|
|
201
|
-
* @param scaleFactor - factor of scaling
|
|
202
|
-
* @returns new rectangle
|
|
203
|
-
*
|
|
204
|
-
* @public
|
|
205
|
-
*/
|
|
206
|
-
declare function scaleRect(rect: Rect, scaleFactor: number): Rect;
|
|
207
|
-
/**
|
|
208
|
-
* Calculate new rectangle after transforming the container
|
|
209
|
-
* @param containerSize - size of the container
|
|
210
|
-
* @param rect - the target rectangle
|
|
211
|
-
* @param rotation - rotated angle
|
|
212
|
-
* @param scaleFactor - factor of scaling
|
|
213
|
-
* @returns new rectangle after transformation
|
|
214
|
-
*
|
|
215
|
-
* @public
|
|
216
|
-
*/
|
|
217
|
-
declare function transformRect(containerSize: Size, rect: Rect, rotation: Rotation, scaleFactor: number): Rect;
|
|
218
|
-
/**
|
|
219
|
-
* Calculate new rectangle before transforming the container
|
|
220
|
-
* @param containerSize - size of the container
|
|
221
|
-
* @param rect - the target rectangle
|
|
222
|
-
* @param rotation - rotated angle
|
|
223
|
-
* @param scaleFactor - factor of scaling
|
|
224
|
-
* @returns original rectangle before transformation
|
|
225
|
-
*
|
|
226
|
-
* @public
|
|
227
|
-
*/
|
|
228
|
-
declare function restoreRect(containerSize: Size, rect: Rect, rotation: Rotation, scaleFactor: number): Rect;
|
|
229
|
-
/**
|
|
230
|
-
* Calculate the original offset in a transformed container
|
|
231
|
-
* @param offset - position of the point
|
|
232
|
-
* @param rotation - rotated angle
|
|
233
|
-
* @param scaleFactor - factor of scaling
|
|
234
|
-
* @returns original position of the point
|
|
235
|
-
*
|
|
236
|
-
* @public
|
|
237
|
-
*/
|
|
238
|
-
declare function restoreOffset(offset: Position, rotation: Rotation, scaleFactor: number): Position;
|
|
239
|
-
/**
|
|
240
|
-
* Return the smallest rectangle that encloses *all* `rects`.
|
|
241
|
-
* If the array is empty, returns `null`.
|
|
242
|
-
*
|
|
243
|
-
* @param rects - array of rectangles
|
|
244
|
-
* @returns smallest rectangle that encloses all the rectangles
|
|
245
|
-
*
|
|
246
|
-
* @public
|
|
247
|
-
*/
|
|
248
|
-
declare function boundingRect(rects: Rect[]): Rect | null;
|
|
249
|
-
interface Matrix {
|
|
250
|
-
a: number;
|
|
251
|
-
b: number;
|
|
252
|
-
c: number;
|
|
253
|
-
d: number;
|
|
254
|
-
e: number;
|
|
255
|
-
f: number;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Build a CTM that maps *PDF-space* inside the annotation
|
|
259
|
-
* → *device-space* inside the bitmap, honouring
|
|
260
|
-
* zoom (scaleFactor × dpr) **and** page-rotation.
|
|
261
|
-
*/
|
|
262
|
-
/** build the CTM for any page-rotation */
|
|
263
|
-
declare const makeMatrix: (rectangle: Rect, rotation: Rotation, scaleFactor: number) => Matrix;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* logger for logging
|
|
267
|
-
*
|
|
268
|
-
* @public
|
|
269
|
-
*/
|
|
270
|
-
interface Logger {
|
|
271
|
-
/**
|
|
272
|
-
* Log debug message
|
|
273
|
-
* @param source - source of log
|
|
274
|
-
* @param category - category of log
|
|
275
|
-
* @param args - parameters of log
|
|
276
|
-
* @returns
|
|
277
|
-
*
|
|
278
|
-
* @public
|
|
279
|
-
*/
|
|
280
|
-
debug: (source: string, category: string, ...args: any) => void;
|
|
281
|
-
/**
|
|
282
|
-
* Log infor message
|
|
283
|
-
* @param source - source of log
|
|
284
|
-
* @param category - category of log
|
|
285
|
-
* @param args - parameters of log
|
|
286
|
-
* @returns
|
|
287
|
-
*
|
|
288
|
-
* @public
|
|
289
|
-
*/
|
|
290
|
-
info: (source: string, category: string, ...args: any) => void;
|
|
291
|
-
/**
|
|
292
|
-
* Log warning message
|
|
293
|
-
* @param source - source of log
|
|
294
|
-
* @param category - category of log
|
|
295
|
-
* @param args - parameters of log
|
|
296
|
-
* @returns
|
|
297
|
-
*
|
|
298
|
-
* @public
|
|
299
|
-
*/
|
|
300
|
-
warn: (source: string, category: string, ...args: any) => void;
|
|
301
|
-
/**
|
|
302
|
-
* Log error message
|
|
303
|
-
* @param source - source of log
|
|
304
|
-
* @param category - category of log
|
|
305
|
-
* @param args - parameters of log
|
|
306
|
-
* @returns
|
|
307
|
-
*
|
|
308
|
-
* @public
|
|
309
|
-
*/
|
|
310
|
-
error: (source: string, category: string, ...args: any) => void;
|
|
311
|
-
/**
|
|
312
|
-
* Log performance log
|
|
313
|
-
* @param source - source of log
|
|
314
|
-
* @param category - category of log
|
|
315
|
-
* @param event - event of log
|
|
316
|
-
* @param phase - event phase of log
|
|
317
|
-
* @param args - parameters of log
|
|
318
|
-
* @returns
|
|
319
|
-
*
|
|
320
|
-
* @public
|
|
321
|
-
*/
|
|
322
|
-
perf: (source: string, category: string, event: string, phase: 'Begin' | 'End', ...args: any) => void;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Logger that log nothing, it will ignore all the logs
|
|
326
|
-
*
|
|
327
|
-
* @public
|
|
328
|
-
*/
|
|
329
|
-
declare class NoopLogger implements Logger {
|
|
330
|
-
/** {@inheritDoc Logger.debug} */
|
|
331
|
-
debug(): void;
|
|
332
|
-
/** {@inheritDoc Logger.info} */
|
|
333
|
-
info(): void;
|
|
334
|
-
/** {@inheritDoc Logger.warn} */
|
|
335
|
-
warn(): void;
|
|
336
|
-
/** {@inheritDoc Logger.error} */
|
|
337
|
-
error(): void;
|
|
338
|
-
/** {@inheritDoc Logger.perf} */
|
|
339
|
-
perf(): void;
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Logger that use console as the output
|
|
343
|
-
*
|
|
344
|
-
* @public
|
|
345
|
-
*/
|
|
346
|
-
declare class ConsoleLogger implements Logger {
|
|
347
|
-
/** {@inheritDoc Logger.debug} */
|
|
348
|
-
debug(source: string, category: string, ...args: any): void;
|
|
349
|
-
/** {@inheritDoc Logger.info} */
|
|
350
|
-
info(source: string, category: string, ...args: any): void;
|
|
351
|
-
/** {@inheritDoc Logger.warn} */
|
|
352
|
-
warn(source: string, category: string, ...args: any): void;
|
|
353
|
-
/** {@inheritDoc Logger.error} */
|
|
354
|
-
error(source: string, category: string, ...args: any): void;
|
|
355
|
-
/** {@inheritDoc Logger.perf} */
|
|
356
|
-
perf(source: string, category: string, event: string, phase: 'Begin' | 'End', ...args: any): void;
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* Level of log
|
|
360
|
-
*
|
|
361
|
-
* @public
|
|
362
|
-
*/
|
|
363
|
-
declare enum LogLevel {
|
|
364
|
-
Debug = 0,
|
|
365
|
-
Info = 1,
|
|
366
|
-
Warn = 2,
|
|
367
|
-
Error = 3
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Logger that support filtering by log level
|
|
371
|
-
*
|
|
372
|
-
* @public
|
|
373
|
-
*/
|
|
374
|
-
declare class LevelLogger implements Logger {
|
|
375
|
-
private logger;
|
|
376
|
-
private level;
|
|
377
|
-
/**
|
|
378
|
-
* create new LevelLogger
|
|
379
|
-
* @param logger - the original logger
|
|
380
|
-
* @param level - log level that used for filtering, all logs lower than this level will be filtered out
|
|
381
|
-
*/
|
|
382
|
-
constructor(logger: Logger, level: LogLevel);
|
|
383
|
-
/** {@inheritDoc Logger.debug} */
|
|
384
|
-
debug(source: string, category: string, ...args: any): void;
|
|
385
|
-
/** {@inheritDoc Logger.info} */
|
|
386
|
-
info(source: string, category: string, ...args: any): void;
|
|
387
|
-
/** {@inheritDoc Logger.warn} */
|
|
388
|
-
warn(source: string, category: string, ...args: any): void;
|
|
389
|
-
/** {@inheritDoc Logger.error} */
|
|
390
|
-
error(source: string, category: string, ...args: any): void;
|
|
391
|
-
/** {@inheritDoc Logger.perf} */
|
|
392
|
-
perf(source: string, category: string, event: string, phase: 'Begin' | 'End', ...args: any): void;
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Logger for performance tracking
|
|
396
|
-
*
|
|
397
|
-
* @public
|
|
398
|
-
*/
|
|
399
|
-
declare class PerfLogger implements Logger {
|
|
400
|
-
/**
|
|
401
|
-
* create new PerfLogger
|
|
402
|
-
*/
|
|
403
|
-
constructor();
|
|
404
|
-
/** {@inheritDoc Logger.debug} */
|
|
405
|
-
debug(source: string, category: string, ...args: any): void;
|
|
406
|
-
/** {@inheritDoc Logger.info} */
|
|
407
|
-
info(source: string, category: string, ...args: any): void;
|
|
408
|
-
/** {@inheritDoc Logger.warn} */
|
|
409
|
-
warn(source: string, category: string, ...args: any): void;
|
|
410
|
-
/** {@inheritDoc Logger.error} */
|
|
411
|
-
error(source: string, category: string, ...args: any): void;
|
|
412
|
-
/** {@inheritDoc Logger.perf} */
|
|
413
|
-
perf(source: string, category: string, event: string, phase: 'Begin' | 'End', identifier: string, ...args: any): void;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Logger that will track and call child loggers
|
|
417
|
-
*
|
|
418
|
-
* @public
|
|
419
|
-
*/
|
|
420
|
-
declare class AllLogger implements Logger {
|
|
421
|
-
private loggers;
|
|
422
|
-
/**
|
|
423
|
-
* create new PerfLogger
|
|
424
|
-
*/
|
|
425
|
-
constructor(loggers: Logger[]);
|
|
426
|
-
/** {@inheritDoc Logger.debug} */
|
|
427
|
-
debug(source: string, category: string, ...args: any): void;
|
|
428
|
-
/** {@inheritDoc Logger.info} */
|
|
429
|
-
info(source: string, category: string, ...args: any): void;
|
|
430
|
-
/** {@inheritDoc Logger.warn} */
|
|
431
|
-
warn(source: string, category: string, ...args: any): void;
|
|
432
|
-
/** {@inheritDoc Logger.error} */
|
|
433
|
-
error(source: string, category: string, ...args: any): void;
|
|
434
|
-
/** {@inheritDoc Logger.perf} */
|
|
435
|
-
perf(source: string, category: string, event: string, phase: 'Begin' | 'End', ...args: any): void;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
interface WebAlphaColor {
|
|
439
|
-
color: string;
|
|
440
|
-
opacity: number;
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* Convert a {@link PdfAlphaColor} to a CSS-style colour definition.
|
|
444
|
-
*
|
|
445
|
-
* @param c - the colour coming from PDFium (0-255 per channel)
|
|
446
|
-
* @returns
|
|
447
|
-
* hex – #RRGGBB (no alpha channel)
|
|
448
|
-
* opacity – 0-1 float suitable for CSS `opacity`/`rgba()`
|
|
449
|
-
*/
|
|
450
|
-
declare function pdfAlphaColorToWebAlphaColor(c: PdfAlphaColor): WebAlphaColor;
|
|
451
|
-
/**
|
|
452
|
-
* Convert a CSS hex colour + opacity back into {@link PdfAlphaColor}
|
|
453
|
-
*
|
|
454
|
-
* @param hex - #RGB, #RRGGBB, or #rrggbb
|
|
455
|
-
* @param opacity - 0-1 float (values outside clamp automatically)
|
|
456
|
-
*/
|
|
457
|
-
declare function webAlphaColorToPdfAlphaColor({ color, opacity }: WebAlphaColor): PdfAlphaColor;
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Stage of task
|
|
461
|
-
*
|
|
462
|
-
* @public
|
|
463
|
-
*/
|
|
464
|
-
declare enum TaskStage {
|
|
465
|
-
/**
|
|
466
|
-
* Task is pending, means it just start executing
|
|
467
|
-
*/
|
|
468
|
-
Pending = 0,
|
|
469
|
-
/**
|
|
470
|
-
* Task is succeed
|
|
471
|
-
*/
|
|
472
|
-
Resolved = 1,
|
|
473
|
-
/**
|
|
474
|
-
* Task is failed
|
|
475
|
-
*/
|
|
476
|
-
Rejected = 2,
|
|
477
|
-
/**
|
|
478
|
-
* Task is aborted
|
|
479
|
-
*/
|
|
480
|
-
Aborted = 3
|
|
481
|
-
}
|
|
482
|
-
interface TaskError<D> {
|
|
483
|
-
/**
|
|
484
|
-
* task error type
|
|
485
|
-
*/
|
|
486
|
-
type: 'reject' | 'abort';
|
|
487
|
-
/**
|
|
488
|
-
* task error
|
|
489
|
-
*/
|
|
490
|
-
reason: D;
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* callback that will be called when task is resolved
|
|
494
|
-
*
|
|
495
|
-
* @public
|
|
496
|
-
*/
|
|
497
|
-
type ResolvedCallback<R> = (r: R) => void;
|
|
498
|
-
/**
|
|
499
|
-
* callback that will be called when task is rejected
|
|
500
|
-
*
|
|
501
|
-
* @public
|
|
502
|
-
*/
|
|
503
|
-
type RejectedCallback<D> = (e: TaskError<D>) => void;
|
|
504
|
-
/**
|
|
505
|
-
* Task state in different stage
|
|
506
|
-
*
|
|
507
|
-
* @public
|
|
508
|
-
*/
|
|
509
|
-
type TaskState<R, D> = {
|
|
510
|
-
stage: TaskStage.Pending;
|
|
511
|
-
} | {
|
|
512
|
-
stage: TaskStage.Resolved;
|
|
513
|
-
result: R;
|
|
514
|
-
} | {
|
|
515
|
-
stage: TaskStage.Rejected;
|
|
516
|
-
reason: D;
|
|
517
|
-
} | {
|
|
518
|
-
stage: TaskStage.Aborted;
|
|
519
|
-
reason: D;
|
|
520
|
-
};
|
|
521
|
-
/**
|
|
522
|
-
* Result type for allSettled
|
|
523
|
-
*
|
|
524
|
-
* @public
|
|
525
|
-
*/
|
|
526
|
-
type TaskSettledResult<R, D> = {
|
|
527
|
-
status: 'resolved';
|
|
528
|
-
value: R;
|
|
529
|
-
} | {
|
|
530
|
-
status: 'rejected';
|
|
531
|
-
reason: D;
|
|
532
|
-
} | {
|
|
533
|
-
status: 'aborted';
|
|
534
|
-
reason: D;
|
|
535
|
-
};
|
|
536
|
-
declare class TaskAbortedError<D> extends Error {
|
|
537
|
-
constructor(reason: D);
|
|
538
|
-
}
|
|
539
|
-
declare class TaskRejectedError<D> extends Error {
|
|
540
|
-
constructor(reason: D);
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* Base class of task
|
|
544
|
-
*
|
|
545
|
-
* @public
|
|
546
|
-
*/
|
|
547
|
-
declare class Task<R, D> {
|
|
548
|
-
state: TaskState<R, D>;
|
|
549
|
-
/**
|
|
550
|
-
* callbacks that will be executed when task is resolved
|
|
551
|
-
*/
|
|
552
|
-
resolvedCallbacks: ResolvedCallback<R>[];
|
|
553
|
-
/**
|
|
554
|
-
* callbacks that will be executed when task is rejected
|
|
555
|
-
*/
|
|
556
|
-
rejectedCallbacks: RejectedCallback<D>[];
|
|
557
|
-
/**
|
|
558
|
-
* Promise that will be resolved when task is settled
|
|
559
|
-
*/
|
|
560
|
-
private _promise;
|
|
561
|
-
/**
|
|
562
|
-
* Convert task to promise
|
|
563
|
-
* @returns promise that will be resolved when task is settled
|
|
564
|
-
*/
|
|
565
|
-
toPromise(): Promise<R>;
|
|
566
|
-
/**
|
|
567
|
-
* wait for task to be settled
|
|
568
|
-
* @param resolvedCallback - callback for resolved value
|
|
569
|
-
* @param rejectedCallback - callback for rejected value
|
|
570
|
-
*/
|
|
571
|
-
wait(resolvedCallback: ResolvedCallback<R>, rejectedCallback: RejectedCallback<D>): void;
|
|
572
|
-
/**
|
|
573
|
-
* resolve task with specific result
|
|
574
|
-
* @param result - result value
|
|
575
|
-
*/
|
|
576
|
-
resolve(result: R): void;
|
|
577
|
-
/**
|
|
578
|
-
* reject task with specific reason
|
|
579
|
-
* @param reason - abort reason
|
|
580
|
-
*
|
|
581
|
-
*/
|
|
582
|
-
reject(reason: D): void;
|
|
583
|
-
/**
|
|
584
|
-
* abort task with specific reason
|
|
585
|
-
* @param reason - abort reason
|
|
586
|
-
*/
|
|
587
|
-
abort(reason: D): void;
|
|
588
|
-
/**
|
|
589
|
-
* fail task with a TaskError from another task
|
|
590
|
-
* This is a convenience method for error propagation between tasks
|
|
591
|
-
* @param error - TaskError from another task
|
|
592
|
-
*/
|
|
593
|
-
fail(error: TaskError<D>): void;
|
|
594
|
-
/**
|
|
595
|
-
* Static method to wait for all tasks to resolve
|
|
596
|
-
* Returns a new task that resolves with an array of all results
|
|
597
|
-
* Rejects immediately if any task fails
|
|
598
|
-
*
|
|
599
|
-
* @param tasks - array of tasks to wait for
|
|
600
|
-
* @returns new task that resolves when all input tasks resolve
|
|
601
|
-
* @public
|
|
602
|
-
*/
|
|
603
|
-
static all<R extends readonly Task<any, any>[]>(tasks: R): Task<{
|
|
604
|
-
[K in keyof R]: R[K] extends Task<infer U, any> ? U : never;
|
|
605
|
-
}, any>;
|
|
606
|
-
/**
|
|
607
|
-
* Static method to wait for all tasks to settle (resolve, reject, or abort)
|
|
608
|
-
* Always resolves with an array of settlement results
|
|
609
|
-
*
|
|
610
|
-
* @param tasks - array of tasks to wait for
|
|
611
|
-
* @returns new task that resolves when all input tasks settle
|
|
612
|
-
* @public
|
|
613
|
-
*/
|
|
614
|
-
static allSettled<R extends readonly Task<any, any>[]>(tasks: R): Task<{
|
|
615
|
-
[K in keyof R]: R[K] extends Task<infer U, infer E> ? TaskSettledResult<U, E> : never;
|
|
616
|
-
}, never>;
|
|
617
|
-
/**
|
|
618
|
-
* Static method that resolves/rejects with the first task that settles
|
|
619
|
-
*
|
|
620
|
-
* @param tasks - array of tasks to race
|
|
621
|
-
* @returns new task that settles with the first input task that settles
|
|
622
|
-
* @public
|
|
623
|
-
*/
|
|
624
|
-
static race<R extends readonly Task<any, any>[]>(tasks: R): Task<R[number] extends Task<infer U, any> ? U : never, R[number] extends Task<any, infer E> ? E : never>;
|
|
625
|
-
/**
|
|
626
|
-
* Utility to track progress of multiple tasks
|
|
627
|
-
*
|
|
628
|
-
* @param tasks - array of tasks to track
|
|
629
|
-
* @param onProgress - callback called when any task completes
|
|
630
|
-
* @returns new task that resolves when all input tasks resolve
|
|
631
|
-
* @public
|
|
632
|
-
*/
|
|
633
|
-
static withProgress<R extends readonly Task<any, any>[]>(tasks: R, onProgress?: (completed: number, total: number) => void): Task<{
|
|
634
|
-
[K in keyof R]: R[K] extends Task<infer U, any> ? U : never;
|
|
635
|
-
}, any>;
|
|
636
|
-
}
|
|
637
|
-
/**
|
|
638
|
-
* Type that represent the result of executing task
|
|
639
|
-
*/
|
|
640
|
-
type TaskReturn<T extends Task<any, any>> = T extends Task<infer R, infer E> ? {
|
|
641
|
-
type: 'result';
|
|
642
|
-
value: R;
|
|
643
|
-
} | {
|
|
644
|
-
type: 'error';
|
|
645
|
-
value: TaskError<E>;
|
|
646
|
-
} : never;
|
|
647
|
-
|
|
1
|
+
import { WebAlphaColor } from './color';
|
|
2
|
+
import { Size, Rect, Position, Rotation } from './geometry';
|
|
3
|
+
import { Task, TaskError } from './task';
|
|
648
4
|
/**
|
|
649
5
|
* Representation of pdf page
|
|
650
6
|
*
|
|
651
7
|
* @public
|
|
652
8
|
*/
|
|
653
|
-
interface PdfPageObject {
|
|
9
|
+
export interface PdfPageObject {
|
|
654
10
|
/**
|
|
655
11
|
* Index of this page, starts from 0
|
|
656
12
|
*/
|
|
@@ -665,7 +21,7 @@ interface PdfPageObject {
|
|
|
665
21
|
*
|
|
666
22
|
* @public
|
|
667
23
|
*/
|
|
668
|
-
interface PdfPageObjectWithRotatedSize extends PdfPageObject {
|
|
24
|
+
export interface PdfPageObjectWithRotatedSize extends PdfPageObject {
|
|
669
25
|
/**
|
|
670
26
|
* Rotated size of this page
|
|
671
27
|
*/
|
|
@@ -676,7 +32,7 @@ interface PdfPageObjectWithRotatedSize extends PdfPageObject {
|
|
|
676
32
|
*
|
|
677
33
|
* @public
|
|
678
34
|
*/
|
|
679
|
-
interface PdfDocumentObject {
|
|
35
|
+
export interface PdfDocumentObject {
|
|
680
36
|
/**
|
|
681
37
|
* Identity of document
|
|
682
38
|
*/
|
|
@@ -695,7 +51,7 @@ interface PdfDocumentObject {
|
|
|
695
51
|
*
|
|
696
52
|
* @public
|
|
697
53
|
*/
|
|
698
|
-
interface PdfMetadataObject {
|
|
54
|
+
export interface PdfMetadataObject {
|
|
699
55
|
/**
|
|
700
56
|
* title of the document
|
|
701
57
|
*/
|
|
@@ -735,49 +91,49 @@ interface PdfMetadataObject {
|
|
|
735
91
|
*
|
|
736
92
|
* @public
|
|
737
93
|
*/
|
|
738
|
-
declare const PdfSoftHyphenMarker = "\u00AD";
|
|
94
|
+
export declare const PdfSoftHyphenMarker = "\u00AD";
|
|
739
95
|
/**
|
|
740
96
|
* Unicode **zero-width space** (`U+200B`).
|
|
741
97
|
*
|
|
742
98
|
* @public
|
|
743
99
|
*/
|
|
744
|
-
declare const PdfZeroWidthSpace = "\u200B";
|
|
100
|
+
export declare const PdfZeroWidthSpace = "\u200B";
|
|
745
101
|
/**
|
|
746
102
|
* Unicode **word-joiner** (`U+2060`) – zero-width no-break.
|
|
747
103
|
*
|
|
748
104
|
* @public
|
|
749
105
|
*/
|
|
750
|
-
declare const PdfWordJoiner = "\u2060";
|
|
106
|
+
export declare const PdfWordJoiner = "\u2060";
|
|
751
107
|
/**
|
|
752
108
|
* Unicode **byte-order mark / zero-width no-break space** (`U+FEFF`).
|
|
753
109
|
*
|
|
754
110
|
* @public
|
|
755
111
|
*/
|
|
756
|
-
declare const PdfBomOrZwnbsp = "\uFEFF";
|
|
112
|
+
export declare const PdfBomOrZwnbsp = "\uFEFF";
|
|
757
113
|
/**
|
|
758
114
|
* Unicode non-character `U+FFFE`.
|
|
759
115
|
*
|
|
760
116
|
* @public
|
|
761
117
|
*/
|
|
762
|
-
declare const PdfNonCharacterFFFE = "\uFFFE";
|
|
118
|
+
export declare const PdfNonCharacterFFFE = "\uFFFE";
|
|
763
119
|
/**
|
|
764
120
|
* Unicode non-character `U+FFFF`.
|
|
765
121
|
*
|
|
766
122
|
* @public
|
|
767
123
|
*/
|
|
768
|
-
declare const PdfNonCharacterFFFF = "\uFFFF";
|
|
124
|
+
export declare const PdfNonCharacterFFFF = "\uFFFF";
|
|
769
125
|
/**
|
|
770
126
|
* **Frozen list** of all unwanted markers in canonical order.
|
|
771
127
|
*
|
|
772
128
|
* @public
|
|
773
129
|
*/
|
|
774
|
-
declare const PdfUnwantedTextMarkers: readonly ["", "", "", "", "", ""];
|
|
130
|
+
export declare const PdfUnwantedTextMarkers: readonly ["", "", "", "", "", ""];
|
|
775
131
|
/**
|
|
776
132
|
* Compiled regular expression that matches any unwanted marker.
|
|
777
133
|
*
|
|
778
134
|
* @public
|
|
779
135
|
*/
|
|
780
|
-
declare const PdfUnwantedTextRegex: RegExp;
|
|
136
|
+
export declare const PdfUnwantedTextRegex: RegExp;
|
|
781
137
|
/**
|
|
782
138
|
* Remove all {@link PdfUnwantedTextMarkers | unwanted markers} from *text*.
|
|
783
139
|
*
|
|
@@ -786,13 +142,13 @@ declare const PdfUnwantedTextRegex: RegExp;
|
|
|
786
142
|
*
|
|
787
143
|
* @public
|
|
788
144
|
*/
|
|
789
|
-
declare function stripPdfUnwantedMarkers(text: string): string;
|
|
145
|
+
export declare function stripPdfUnwantedMarkers(text: string): string;
|
|
790
146
|
/**
|
|
791
147
|
* zoom mode
|
|
792
148
|
*
|
|
793
149
|
* @public
|
|
794
150
|
*/
|
|
795
|
-
declare enum PdfZoomMode {
|
|
151
|
+
export declare enum PdfZoomMode {
|
|
796
152
|
Unknown = 0,
|
|
797
153
|
/**
|
|
798
154
|
* Zoom level with specified offset.
|
|
@@ -815,12 +171,86 @@ declare enum PdfZoomMode {
|
|
|
815
171
|
*/
|
|
816
172
|
FitRectangle = 5
|
|
817
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Blend mode
|
|
176
|
+
*
|
|
177
|
+
* @public
|
|
178
|
+
*/
|
|
179
|
+
export declare enum PdfBlendMode {
|
|
180
|
+
Normal = 0,
|
|
181
|
+
Multiply = 1,
|
|
182
|
+
Screen = 2,
|
|
183
|
+
Overlay = 3,
|
|
184
|
+
Darken = 4,
|
|
185
|
+
Lighten = 5,
|
|
186
|
+
ColorDodge = 6,
|
|
187
|
+
ColorBurn = 7,
|
|
188
|
+
HardLight = 8,
|
|
189
|
+
SoftLight = 9,
|
|
190
|
+
Difference = 10,
|
|
191
|
+
Exclusion = 11,
|
|
192
|
+
Hue = 12,
|
|
193
|
+
Saturation = 13,
|
|
194
|
+
Color = 14,
|
|
195
|
+
Luminosity = 15
|
|
196
|
+
}
|
|
197
|
+
/** Extra UI sentinel for “multiple different values selected”. */
|
|
198
|
+
export declare const MixedBlendMode: unique symbol;
|
|
199
|
+
export type UiBlendModeValue = PdfBlendMode | typeof MixedBlendMode;
|
|
200
|
+
export type CssBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
|
|
201
|
+
interface BlendModeInfo {
|
|
202
|
+
/** Pdf enum value */
|
|
203
|
+
id: PdfBlendMode;
|
|
204
|
+
/** Human label for UI */
|
|
205
|
+
label: string;
|
|
206
|
+
/** CSS mix-blend-mode token */
|
|
207
|
+
css: CssBlendMode;
|
|
208
|
+
}
|
|
209
|
+
/** Get descriptor (falls back to Normal if unknown number sneaks in).
|
|
210
|
+
*
|
|
211
|
+
* @public
|
|
212
|
+
*/
|
|
213
|
+
export declare function getBlendModeInfo(mode: PdfBlendMode): BlendModeInfo;
|
|
214
|
+
/** Convert enum → CSS value for `mix-blend-mode`.
|
|
215
|
+
*
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
export declare function blendModeToCss(mode: PdfBlendMode): CssBlendMode;
|
|
219
|
+
/** Convert CSS token → enum (returns undefined if not recognized).
|
|
220
|
+
*
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
export declare function cssToBlendMode(value: CssBlendMode): PdfBlendMode | undefined;
|
|
224
|
+
/** Enum → UI label.
|
|
225
|
+
*
|
|
226
|
+
* @public
|
|
227
|
+
*/
|
|
228
|
+
export declare function blendModeLabel(mode: PdfBlendMode): string;
|
|
229
|
+
/**
|
|
230
|
+
* For a selection of annotations: returns the common enum value, or Mixed sentinel.
|
|
231
|
+
*
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
export declare function reduceBlendModes(modes: readonly PdfBlendMode[]): UiBlendModeValue;
|
|
235
|
+
/** Options for a <select>.
|
|
236
|
+
*
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
export declare const blendModeSelectOptions: {
|
|
240
|
+
value: PdfBlendMode;
|
|
241
|
+
label: string;
|
|
242
|
+
}[];
|
|
243
|
+
/** Provide a label when Mixed sentinel used (UI convenience).
|
|
244
|
+
*
|
|
245
|
+
* @public
|
|
246
|
+
*/
|
|
247
|
+
export declare function uiBlendModeDisplay(value: UiBlendModeValue): string;
|
|
818
248
|
/**
|
|
819
249
|
* Representation of the linked destination
|
|
820
250
|
*
|
|
821
251
|
* @public
|
|
822
252
|
*/
|
|
823
|
-
interface PdfDestinationObject {
|
|
253
|
+
export interface PdfDestinationObject {
|
|
824
254
|
/**
|
|
825
255
|
* Index of target page
|
|
826
256
|
*/
|
|
@@ -853,7 +283,7 @@ interface PdfDestinationObject {
|
|
|
853
283
|
*
|
|
854
284
|
* @public
|
|
855
285
|
*/
|
|
856
|
-
declare enum PdfActionType {
|
|
286
|
+
export declare enum PdfActionType {
|
|
857
287
|
Unsupported = 0,
|
|
858
288
|
/**
|
|
859
289
|
* Goto specified position in this document
|
|
@@ -872,7 +302,7 @@ declare enum PdfActionType {
|
|
|
872
302
|
*/
|
|
873
303
|
LaunchAppOrOpenFile = 4
|
|
874
304
|
}
|
|
875
|
-
type PdfImage = {
|
|
305
|
+
export type PdfImage = {
|
|
876
306
|
data: Uint8ClampedArray;
|
|
877
307
|
width: number;
|
|
878
308
|
height: number;
|
|
@@ -882,7 +312,7 @@ type PdfImage = {
|
|
|
882
312
|
*
|
|
883
313
|
* @public
|
|
884
314
|
*/
|
|
885
|
-
type PdfActionObject = {
|
|
315
|
+
export type PdfActionObject = {
|
|
886
316
|
type: PdfActionType.Unsupported;
|
|
887
317
|
} | {
|
|
888
318
|
type: PdfActionType.Goto;
|
|
@@ -902,7 +332,7 @@ type PdfActionObject = {
|
|
|
902
332
|
*
|
|
903
333
|
* @public
|
|
904
334
|
*/
|
|
905
|
-
type PdfLinkTarget = {
|
|
335
|
+
export type PdfLinkTarget = {
|
|
906
336
|
type: 'action';
|
|
907
337
|
action: PdfActionObject;
|
|
908
338
|
} | {
|
|
@@ -914,7 +344,7 @@ type PdfLinkTarget = {
|
|
|
914
344
|
*
|
|
915
345
|
* @public
|
|
916
346
|
*/
|
|
917
|
-
interface PdfBookmarkObject {
|
|
347
|
+
export interface PdfBookmarkObject {
|
|
918
348
|
/**
|
|
919
349
|
* title of bookmark
|
|
920
350
|
*/
|
|
@@ -933,7 +363,7 @@ interface PdfBookmarkObject {
|
|
|
933
363
|
*
|
|
934
364
|
* @public
|
|
935
365
|
*/
|
|
936
|
-
interface PdfSignatureObject {
|
|
366
|
+
export interface PdfSignatureObject {
|
|
937
367
|
/**
|
|
938
368
|
* contents of signature
|
|
939
369
|
*/
|
|
@@ -964,7 +394,7 @@ interface PdfSignatureObject {
|
|
|
964
394
|
*
|
|
965
395
|
* @public
|
|
966
396
|
*/
|
|
967
|
-
interface PdfBookmarksObject {
|
|
397
|
+
export interface PdfBookmarksObject {
|
|
968
398
|
bookmarks: PdfBookmarkObject[];
|
|
969
399
|
}
|
|
970
400
|
/**
|
|
@@ -972,7 +402,7 @@ interface PdfBookmarksObject {
|
|
|
972
402
|
*
|
|
973
403
|
* @public
|
|
974
404
|
*/
|
|
975
|
-
interface PdfTextRectObject {
|
|
405
|
+
export interface PdfTextRectObject {
|
|
976
406
|
/**
|
|
977
407
|
* Font of the text
|
|
978
408
|
*/
|
|
@@ -1000,7 +430,7 @@ interface PdfTextRectObject {
|
|
|
1000
430
|
*
|
|
1001
431
|
* @public
|
|
1002
432
|
*/
|
|
1003
|
-
interface PdfAlphaColor {
|
|
433
|
+
export interface PdfAlphaColor {
|
|
1004
434
|
/**
|
|
1005
435
|
* red
|
|
1006
436
|
*/
|
|
@@ -1023,7 +453,7 @@ interface PdfAlphaColor {
|
|
|
1023
453
|
*
|
|
1024
454
|
* @public
|
|
1025
455
|
*/
|
|
1026
|
-
declare enum PdfAnnotationSubtype {
|
|
456
|
+
export declare enum PdfAnnotationSubtype {
|
|
1027
457
|
UNKNOWN = 0,
|
|
1028
458
|
TEXT = 1,
|
|
1029
459
|
LINK = 2,
|
|
@@ -1059,13 +489,13 @@ declare enum PdfAnnotationSubtype {
|
|
|
1059
489
|
*
|
|
1060
490
|
* @public
|
|
1061
491
|
*/
|
|
1062
|
-
declare const PdfAnnotationSubtypeName: Record<PdfAnnotationSubtype, string>;
|
|
492
|
+
export declare const PdfAnnotationSubtypeName: Record<PdfAnnotationSubtype, string>;
|
|
1063
493
|
/**
|
|
1064
494
|
* Status of pdf annotation
|
|
1065
495
|
*
|
|
1066
496
|
* @public
|
|
1067
497
|
*/
|
|
1068
|
-
declare enum PdfAnnotationObjectStatus {
|
|
498
|
+
export declare enum PdfAnnotationObjectStatus {
|
|
1069
499
|
/**
|
|
1070
500
|
* Annotation is created
|
|
1071
501
|
*/
|
|
@@ -1080,7 +510,7 @@ declare enum PdfAnnotationObjectStatus {
|
|
|
1080
510
|
*
|
|
1081
511
|
* @public
|
|
1082
512
|
*/
|
|
1083
|
-
declare enum AppearanceMode {
|
|
513
|
+
export declare enum AppearanceMode {
|
|
1084
514
|
Normal = 0,
|
|
1085
515
|
Rollover = 1,
|
|
1086
516
|
Down = 2
|
|
@@ -1090,7 +520,7 @@ declare enum AppearanceMode {
|
|
|
1090
520
|
*
|
|
1091
521
|
* @public
|
|
1092
522
|
*/
|
|
1093
|
-
declare enum PdfAnnotationState {
|
|
523
|
+
export declare enum PdfAnnotationState {
|
|
1094
524
|
/**
|
|
1095
525
|
* Annotation is active
|
|
1096
526
|
*/
|
|
@@ -1125,7 +555,7 @@ declare enum PdfAnnotationState {
|
|
|
1125
555
|
*
|
|
1126
556
|
* @public
|
|
1127
557
|
*/
|
|
1128
|
-
declare enum PdfAnnotationStateModel {
|
|
558
|
+
export declare enum PdfAnnotationStateModel {
|
|
1129
559
|
/**
|
|
1130
560
|
* Annotation is marked
|
|
1131
561
|
*/
|
|
@@ -1135,12 +565,63 @@ declare enum PdfAnnotationStateModel {
|
|
|
1135
565
|
*/
|
|
1136
566
|
Reviewed = "Reviewed"
|
|
1137
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* Line ending of annotation
|
|
570
|
+
*
|
|
571
|
+
* @public
|
|
572
|
+
*/
|
|
573
|
+
export declare enum PdfAnnotationLineEnding {
|
|
574
|
+
/**
|
|
575
|
+
* No line ending
|
|
576
|
+
*/
|
|
577
|
+
None = 0,
|
|
578
|
+
/**
|
|
579
|
+
* Square line ending
|
|
580
|
+
*/
|
|
581
|
+
Square = 1,
|
|
582
|
+
/**
|
|
583
|
+
* Circle line ending
|
|
584
|
+
*/
|
|
585
|
+
Circle = 2,
|
|
586
|
+
/**
|
|
587
|
+
* Diamond line ending
|
|
588
|
+
*/
|
|
589
|
+
Diamond = 3,
|
|
590
|
+
/**
|
|
591
|
+
* Open arrow line ending
|
|
592
|
+
*/
|
|
593
|
+
OpenArrow = 4,
|
|
594
|
+
/**
|
|
595
|
+
* Closed arrow line ending
|
|
596
|
+
*/
|
|
597
|
+
ClosedArrow = 5,
|
|
598
|
+
/**
|
|
599
|
+
* Butt line ending
|
|
600
|
+
*/
|
|
601
|
+
Butt = 6,
|
|
602
|
+
/**
|
|
603
|
+
* Right open arrow line ending
|
|
604
|
+
*/
|
|
605
|
+
ROpenArrow = 7,
|
|
606
|
+
/**
|
|
607
|
+
* Right closed arrow line ending
|
|
608
|
+
*/
|
|
609
|
+
RClosedArrow = 8,
|
|
610
|
+
/**
|
|
611
|
+
* Slash line ending
|
|
612
|
+
*/
|
|
613
|
+
Slash = 9,
|
|
614
|
+
/**
|
|
615
|
+
* Unknown line ending
|
|
616
|
+
*/
|
|
617
|
+
Unknown = 10
|
|
618
|
+
}
|
|
1138
619
|
/**
|
|
1139
620
|
* Basic information of pdf annotation
|
|
1140
621
|
*
|
|
1141
622
|
* @public
|
|
1142
623
|
*/
|
|
1143
|
-
interface PdfAnnotationObjectBase {
|
|
624
|
+
export interface PdfAnnotationObjectBase {
|
|
1144
625
|
/**
|
|
1145
626
|
* Author of the annotation
|
|
1146
627
|
*/
|
|
@@ -1149,6 +630,14 @@ interface PdfAnnotationObjectBase {
|
|
|
1149
630
|
* Modified date of the annotation
|
|
1150
631
|
*/
|
|
1151
632
|
modified?: Date;
|
|
633
|
+
/**
|
|
634
|
+
* blend mode of annotation
|
|
635
|
+
*/
|
|
636
|
+
blendMode?: PdfBlendMode;
|
|
637
|
+
/**
|
|
638
|
+
* intent of annotation
|
|
639
|
+
*/
|
|
640
|
+
intent?: string;
|
|
1152
641
|
/**
|
|
1153
642
|
* Sub type of annotation
|
|
1154
643
|
*/
|
|
@@ -1171,7 +660,7 @@ interface PdfAnnotationObjectBase {
|
|
|
1171
660
|
*
|
|
1172
661
|
* @public
|
|
1173
662
|
*/
|
|
1174
|
-
interface PdfPopupAnnoObject extends PdfAnnotationObjectBase {
|
|
663
|
+
export interface PdfPopupAnnoObject extends PdfAnnotationObjectBase {
|
|
1175
664
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1176
665
|
type: PdfAnnotationSubtype.POPUP;
|
|
1177
666
|
/**
|
|
@@ -1192,7 +681,7 @@ interface PdfPopupAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1192
681
|
*
|
|
1193
682
|
* @public
|
|
1194
683
|
*/
|
|
1195
|
-
interface PdfLinkAnnoObject extends PdfAnnotationObjectBase {
|
|
684
|
+
export interface PdfLinkAnnoObject extends PdfAnnotationObjectBase {
|
|
1196
685
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1197
686
|
type: PdfAnnotationSubtype.LINK;
|
|
1198
687
|
/**
|
|
@@ -1209,7 +698,7 @@ interface PdfLinkAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1209
698
|
*
|
|
1210
699
|
* @public
|
|
1211
700
|
*/
|
|
1212
|
-
interface PdfTextAnnoObject extends PdfAnnotationObjectBase {
|
|
701
|
+
export interface PdfTextAnnoObject extends PdfAnnotationObjectBase {
|
|
1213
702
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1214
703
|
type: PdfAnnotationSubtype.TEXT;
|
|
1215
704
|
/**
|
|
@@ -1242,7 +731,7 @@ interface PdfTextAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1242
731
|
*
|
|
1243
732
|
* @public
|
|
1244
733
|
*/
|
|
1245
|
-
declare enum PDF_FORM_FIELD_TYPE {
|
|
734
|
+
export declare enum PDF_FORM_FIELD_TYPE {
|
|
1246
735
|
/**
|
|
1247
736
|
* Unknow
|
|
1248
737
|
*/
|
|
@@ -1308,7 +797,7 @@ declare enum PDF_FORM_FIELD_TYPE {
|
|
|
1308
797
|
*/
|
|
1309
798
|
XFA_TEXTFIELD = 15
|
|
1310
799
|
}
|
|
1311
|
-
declare enum PdfAnnotationColorType {
|
|
800
|
+
export declare enum PdfAnnotationColorType {
|
|
1312
801
|
Color = 0,
|
|
1313
802
|
InteriorColor = 1
|
|
1314
803
|
}
|
|
@@ -1317,7 +806,7 @@ declare enum PdfAnnotationColorType {
|
|
|
1317
806
|
*
|
|
1318
807
|
* @public
|
|
1319
808
|
*/
|
|
1320
|
-
declare enum PdfAnnotationBorderStyle {
|
|
809
|
+
export declare enum PdfAnnotationBorderStyle {
|
|
1321
810
|
UNKNOWN = 0,
|
|
1322
811
|
SOLID = 1,
|
|
1323
812
|
DASHED = 2,
|
|
@@ -1331,7 +820,7 @@ declare enum PdfAnnotationBorderStyle {
|
|
|
1331
820
|
*
|
|
1332
821
|
* @public
|
|
1333
822
|
*/
|
|
1334
|
-
declare enum PdfAnnotationFlags {
|
|
823
|
+
export declare enum PdfAnnotationFlags {
|
|
1335
824
|
NONE = 0,
|
|
1336
825
|
INVISIBLE = 1,
|
|
1337
826
|
HIDDEN = 2,
|
|
@@ -1348,7 +837,7 @@ declare enum PdfAnnotationFlags {
|
|
|
1348
837
|
*
|
|
1349
838
|
* @public
|
|
1350
839
|
*/
|
|
1351
|
-
declare enum PDF_FORM_FIELD_FLAG {
|
|
840
|
+
export declare enum PDF_FORM_FIELD_FLAG {
|
|
1352
841
|
NONE = 0,
|
|
1353
842
|
READONLY = 1,
|
|
1354
843
|
REQUIRED = 2,
|
|
@@ -1364,7 +853,7 @@ declare enum PDF_FORM_FIELD_FLAG {
|
|
|
1364
853
|
*
|
|
1365
854
|
* @public
|
|
1366
855
|
*/
|
|
1367
|
-
declare enum PdfPageObjectType {
|
|
856
|
+
export declare enum PdfPageObjectType {
|
|
1368
857
|
UNKNOWN = 0,
|
|
1369
858
|
TEXT = 1,
|
|
1370
859
|
PATH = 2,
|
|
@@ -1372,34 +861,52 @@ declare enum PdfPageObjectType {
|
|
|
1372
861
|
SHADING = 4,
|
|
1373
862
|
FORM = 5
|
|
1374
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* Line points
|
|
866
|
+
*
|
|
867
|
+
* @public
|
|
868
|
+
*/
|
|
869
|
+
export interface LinePoints {
|
|
870
|
+
start: Position;
|
|
871
|
+
end: Position;
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Line endings
|
|
875
|
+
*
|
|
876
|
+
* @public
|
|
877
|
+
*/
|
|
878
|
+
export interface LineEndings {
|
|
879
|
+
start: PdfAnnotationLineEnding;
|
|
880
|
+
end: PdfAnnotationLineEnding;
|
|
881
|
+
}
|
|
1375
882
|
/**
|
|
1376
883
|
* Options of pdf widget annotation
|
|
1377
884
|
*
|
|
1378
885
|
* @public
|
|
1379
886
|
*/
|
|
1380
|
-
interface PdfWidgetAnnoOption {
|
|
887
|
+
export interface PdfWidgetAnnoOption {
|
|
1381
888
|
label: string;
|
|
1382
889
|
isSelected: boolean;
|
|
1383
890
|
}
|
|
891
|
+
export type PdfAnnotationFlagName = 'invisible' | 'hidden' | 'print' | 'noZoom' | 'noRotate' | 'noView' | 'readOnly' | 'locked' | 'toggleNoView';
|
|
1384
892
|
type FlagMap = Partial<Record<Exclude<PdfAnnotationFlags, PdfAnnotationFlags.NONE>, PdfAnnotationFlagName>>;
|
|
1385
|
-
|
|
1386
|
-
declare const PdfAnnotationFlagName: Readonly<FlagMap>;
|
|
893
|
+
export declare const PdfAnnotationFlagName: Readonly<FlagMap>;
|
|
1387
894
|
/**
|
|
1388
895
|
* Convert the raw bit-mask coming from `FPDFAnnot_GetFlags()` into
|
|
1389
896
|
* an array of human-readable flag names (“invisible”, “print”…).
|
|
1390
897
|
*/
|
|
1391
|
-
declare function flagsToNames(raw: number): PdfAnnotationFlagName[];
|
|
898
|
+
export declare function flagsToNames(raw: number): PdfAnnotationFlagName[];
|
|
1392
899
|
/**
|
|
1393
900
|
* Convert an array of flag-names back into the numeric mask that
|
|
1394
901
|
* PDFium expects for `FPDFAnnot_SetFlags()`.
|
|
1395
902
|
*/
|
|
1396
|
-
declare function namesToFlags(names: readonly PdfAnnotationFlagName[]): PdfAnnotationFlags;
|
|
903
|
+
export declare function namesToFlags(names: readonly PdfAnnotationFlagName[]): PdfAnnotationFlags;
|
|
1397
904
|
/**
|
|
1398
905
|
* Field of PDF widget annotation
|
|
1399
906
|
*
|
|
1400
907
|
* @public
|
|
1401
908
|
*/
|
|
1402
|
-
interface PdfWidgetAnnoField {
|
|
909
|
+
export interface PdfWidgetAnnoField {
|
|
1403
910
|
/**
|
|
1404
911
|
* flag of field
|
|
1405
912
|
*/
|
|
@@ -1434,7 +941,7 @@ interface PdfWidgetAnnoField {
|
|
|
1434
941
|
*
|
|
1435
942
|
* @public
|
|
1436
943
|
*/
|
|
1437
|
-
interface PdfWidgetAnnoObject extends PdfAnnotationObjectBase {
|
|
944
|
+
export interface PdfWidgetAnnoObject extends PdfAnnotationObjectBase {
|
|
1438
945
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1439
946
|
type: PdfAnnotationSubtype.WIDGET;
|
|
1440
947
|
/**
|
|
@@ -1447,7 +954,7 @@ interface PdfWidgetAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1447
954
|
*
|
|
1448
955
|
* @public
|
|
1449
956
|
*/
|
|
1450
|
-
interface PdfFileAttachmentAnnoObject extends PdfAnnotationObjectBase {
|
|
957
|
+
export interface PdfFileAttachmentAnnoObject extends PdfAnnotationObjectBase {
|
|
1451
958
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1452
959
|
type: PdfAnnotationSubtype.FILEATTACHMENT;
|
|
1453
960
|
}
|
|
@@ -1456,7 +963,7 @@ interface PdfFileAttachmentAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1456
963
|
*
|
|
1457
964
|
* @public
|
|
1458
965
|
*/
|
|
1459
|
-
interface PdfInkListObject {
|
|
966
|
+
export interface PdfInkListObject {
|
|
1460
967
|
points: Position[];
|
|
1461
968
|
}
|
|
1462
969
|
/**
|
|
@@ -1464,7 +971,7 @@ interface PdfInkListObject {
|
|
|
1464
971
|
*
|
|
1465
972
|
* @public
|
|
1466
973
|
*/
|
|
1467
|
-
interface PdfInkAnnoObject extends PdfAnnotationObjectBase {
|
|
974
|
+
export interface PdfInkAnnoObject extends PdfAnnotationObjectBase {
|
|
1468
975
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1469
976
|
type: PdfAnnotationSubtype.INK;
|
|
1470
977
|
/**
|
|
@@ -1489,50 +996,138 @@ interface PdfInkAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1489
996
|
*
|
|
1490
997
|
* @public
|
|
1491
998
|
*/
|
|
1492
|
-
interface PdfPolygonAnnoObject extends PdfAnnotationObjectBase {
|
|
999
|
+
export interface PdfPolygonAnnoObject extends PdfAnnotationObjectBase {
|
|
1493
1000
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1494
1001
|
type: PdfAnnotationSubtype.POLYGON;
|
|
1002
|
+
/**
|
|
1003
|
+
* contents of polygon annotation
|
|
1004
|
+
*/
|
|
1005
|
+
contents?: string;
|
|
1495
1006
|
/**
|
|
1496
1007
|
* vertices of annotation
|
|
1497
1008
|
*/
|
|
1498
1009
|
vertices: Position[];
|
|
1010
|
+
/**
|
|
1011
|
+
* color of ink annotation
|
|
1012
|
+
*/
|
|
1013
|
+
color: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* opacity of ink annotation
|
|
1016
|
+
*/
|
|
1017
|
+
opacity: number;
|
|
1018
|
+
/**
|
|
1019
|
+
* stroke-width of ink annotation
|
|
1020
|
+
*/
|
|
1021
|
+
strokeWidth: number;
|
|
1022
|
+
/**
|
|
1023
|
+
* stroke color of polygon annotation
|
|
1024
|
+
*/
|
|
1025
|
+
strokeColor: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* stroke style of polygon annotation
|
|
1028
|
+
*/
|
|
1029
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
1030
|
+
/**
|
|
1031
|
+
* stroke dash array of polygon annotation
|
|
1032
|
+
*/
|
|
1033
|
+
strokeDashArray?: number[];
|
|
1499
1034
|
}
|
|
1500
1035
|
/**
|
|
1501
1036
|
* PDF polyline annotation
|
|
1502
1037
|
*
|
|
1503
1038
|
* @public
|
|
1504
1039
|
*/
|
|
1505
|
-
interface PdfPolylineAnnoObject extends PdfAnnotationObjectBase {
|
|
1040
|
+
export interface PdfPolylineAnnoObject extends PdfAnnotationObjectBase {
|
|
1506
1041
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1507
1042
|
type: PdfAnnotationSubtype.POLYLINE;
|
|
1043
|
+
/**
|
|
1044
|
+
* contents of polyline annotation
|
|
1045
|
+
*/
|
|
1046
|
+
contents?: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* start and end line endings of polyline
|
|
1049
|
+
*/
|
|
1050
|
+
lineEndings?: LineEndings;
|
|
1508
1051
|
/**
|
|
1509
1052
|
* vertices of annotation
|
|
1510
1053
|
*/
|
|
1511
1054
|
vertices: Position[];
|
|
1055
|
+
/**
|
|
1056
|
+
* interior color of line annotation
|
|
1057
|
+
*/
|
|
1058
|
+
color: string;
|
|
1059
|
+
/**
|
|
1060
|
+
* opacity of ink annotation
|
|
1061
|
+
*/
|
|
1062
|
+
opacity: number;
|
|
1063
|
+
/**
|
|
1064
|
+
* stroke-width of ink annotation
|
|
1065
|
+
*/
|
|
1066
|
+
strokeWidth: number;
|
|
1067
|
+
/**
|
|
1068
|
+
* stroke color of line annotation
|
|
1069
|
+
*/
|
|
1070
|
+
strokeColor: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* stroke style of polyline annotation
|
|
1073
|
+
*/
|
|
1074
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
1075
|
+
/**
|
|
1076
|
+
* stroke dash array of polyline annotation
|
|
1077
|
+
*/
|
|
1078
|
+
strokeDashArray?: number[];
|
|
1512
1079
|
}
|
|
1513
1080
|
/**
|
|
1514
1081
|
* PDF line annotation
|
|
1515
1082
|
*
|
|
1516
1083
|
* @public
|
|
1517
1084
|
*/
|
|
1518
|
-
interface PdfLineAnnoObject extends PdfAnnotationObjectBase {
|
|
1085
|
+
export interface PdfLineAnnoObject extends PdfAnnotationObjectBase {
|
|
1519
1086
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1520
1087
|
type: PdfAnnotationSubtype.LINE;
|
|
1521
1088
|
/**
|
|
1522
|
-
*
|
|
1089
|
+
* contents of line annotation
|
|
1090
|
+
*/
|
|
1091
|
+
contents?: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* start and end points of line
|
|
1094
|
+
*/
|
|
1095
|
+
linePoints: LinePoints;
|
|
1096
|
+
/**
|
|
1097
|
+
* start and end line endings of line
|
|
1098
|
+
*/
|
|
1099
|
+
lineEndings?: LineEndings;
|
|
1100
|
+
/**
|
|
1101
|
+
* interior color of line annotation
|
|
1102
|
+
*/
|
|
1103
|
+
color: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* opacity of ink annotation
|
|
1106
|
+
*/
|
|
1107
|
+
opacity: number;
|
|
1108
|
+
/**
|
|
1109
|
+
* stroke-width of ink annotation
|
|
1110
|
+
*/
|
|
1111
|
+
strokeWidth: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* stroke color of line annotation
|
|
1523
1114
|
*/
|
|
1524
|
-
|
|
1115
|
+
strokeColor: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* stroke style of line annotation
|
|
1118
|
+
*/
|
|
1119
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
1525
1120
|
/**
|
|
1526
|
-
*
|
|
1121
|
+
* stroke dash array of line annotation
|
|
1527
1122
|
*/
|
|
1528
|
-
|
|
1123
|
+
strokeDashArray?: number[];
|
|
1529
1124
|
}
|
|
1530
1125
|
/**
|
|
1531
1126
|
* PDF highlight annotation
|
|
1532
1127
|
*
|
|
1533
1128
|
* @public
|
|
1534
1129
|
*/
|
|
1535
|
-
interface PdfHighlightAnnoObject extends PdfAnnotationObjectBase {
|
|
1130
|
+
export interface PdfHighlightAnnoObject extends PdfAnnotationObjectBase {
|
|
1536
1131
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1537
1132
|
type: PdfAnnotationSubtype.HIGHLIGHT;
|
|
1538
1133
|
/**
|
|
@@ -1562,7 +1157,7 @@ interface PdfHighlightAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1562
1157
|
* Scaling is performed with [sx 0 0 sy 0 0].
|
|
1563
1158
|
* See PDF Reference 1.7, 4.2.2 Common Transformations for more.
|
|
1564
1159
|
*/
|
|
1565
|
-
interface PdfTransformMatrix {
|
|
1160
|
+
export interface PdfTransformMatrix {
|
|
1566
1161
|
a: number;
|
|
1567
1162
|
b: number;
|
|
1568
1163
|
c: number;
|
|
@@ -1575,7 +1170,7 @@ interface PdfTransformMatrix {
|
|
|
1575
1170
|
*
|
|
1576
1171
|
* @public
|
|
1577
1172
|
*/
|
|
1578
|
-
declare enum PdfSegmentObjectType {
|
|
1173
|
+
export declare enum PdfSegmentObjectType {
|
|
1579
1174
|
UNKNOWN = -1,
|
|
1580
1175
|
LINETO = 0,
|
|
1581
1176
|
BEZIERTO = 1,
|
|
@@ -1586,7 +1181,7 @@ declare enum PdfSegmentObjectType {
|
|
|
1586
1181
|
*
|
|
1587
1182
|
* @public
|
|
1588
1183
|
*/
|
|
1589
|
-
interface PdfSegmentObject {
|
|
1184
|
+
export interface PdfSegmentObject {
|
|
1590
1185
|
type: PdfSegmentObjectType;
|
|
1591
1186
|
/**
|
|
1592
1187
|
* point of the segment
|
|
@@ -1602,7 +1197,7 @@ interface PdfSegmentObject {
|
|
|
1602
1197
|
*
|
|
1603
1198
|
* @public
|
|
1604
1199
|
*/
|
|
1605
|
-
interface PdfPathObject {
|
|
1200
|
+
export interface PdfPathObject {
|
|
1606
1201
|
type: PdfPageObjectType.PATH;
|
|
1607
1202
|
/**
|
|
1608
1203
|
* bound that contains the path
|
|
@@ -1627,7 +1222,7 @@ interface PdfPathObject {
|
|
|
1627
1222
|
*
|
|
1628
1223
|
* @public
|
|
1629
1224
|
*/
|
|
1630
|
-
interface PdfImageObject {
|
|
1225
|
+
export interface PdfImageObject {
|
|
1631
1226
|
type: PdfPageObjectType.IMAGE;
|
|
1632
1227
|
/**
|
|
1633
1228
|
* data of the image
|
|
@@ -1643,7 +1238,7 @@ interface PdfImageObject {
|
|
|
1643
1238
|
*
|
|
1644
1239
|
* @public
|
|
1645
1240
|
*/
|
|
1646
|
-
interface PdfFormObject {
|
|
1241
|
+
export interface PdfFormObject {
|
|
1647
1242
|
type: PdfPageObjectType.FORM;
|
|
1648
1243
|
/**
|
|
1649
1244
|
* objects that in this form object
|
|
@@ -1659,13 +1254,13 @@ interface PdfFormObject {
|
|
|
1659
1254
|
*
|
|
1660
1255
|
* @public
|
|
1661
1256
|
*/
|
|
1662
|
-
type PdfStampAnnoObjectContents = Array<PdfPathObject | PdfImageObject | PdfFormObject>;
|
|
1257
|
+
export type PdfStampAnnoObjectContents = Array<PdfPathObject | PdfImageObject | PdfFormObject>;
|
|
1663
1258
|
/**
|
|
1664
1259
|
* Pdf stamp annotation
|
|
1665
1260
|
*
|
|
1666
1261
|
* @public
|
|
1667
1262
|
*/
|
|
1668
|
-
interface PdfStampAnnoObject extends PdfAnnotationObjectBase {
|
|
1263
|
+
export interface PdfStampAnnoObject extends PdfAnnotationObjectBase {
|
|
1669
1264
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1670
1265
|
type: PdfAnnotationSubtype.STAMP;
|
|
1671
1266
|
/**
|
|
@@ -1678,13 +1273,17 @@ interface PdfStampAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1678
1273
|
*
|
|
1679
1274
|
* @public
|
|
1680
1275
|
*/
|
|
1681
|
-
interface PdfCircleAnnoObject extends PdfAnnotationObjectBase {
|
|
1276
|
+
export interface PdfCircleAnnoObject extends PdfAnnotationObjectBase {
|
|
1682
1277
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1683
1278
|
type: PdfAnnotationSubtype.CIRCLE;
|
|
1684
1279
|
/**
|
|
1685
1280
|
* flags of circle annotation
|
|
1686
1281
|
*/
|
|
1687
1282
|
flags: PdfAnnotationFlagName[];
|
|
1283
|
+
/**
|
|
1284
|
+
* Text contents of the circle annotation
|
|
1285
|
+
*/
|
|
1286
|
+
contents?: string;
|
|
1688
1287
|
/**
|
|
1689
1288
|
* color of circle annotation
|
|
1690
1289
|
*/
|
|
@@ -1723,9 +1322,13 @@ interface PdfCircleAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1723
1322
|
*
|
|
1724
1323
|
* @public
|
|
1725
1324
|
*/
|
|
1726
|
-
interface PdfSquareAnnoObject extends PdfAnnotationObjectBase {
|
|
1325
|
+
export interface PdfSquareAnnoObject extends PdfAnnotationObjectBase {
|
|
1727
1326
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1728
1327
|
type: PdfAnnotationSubtype.SQUARE;
|
|
1328
|
+
/**
|
|
1329
|
+
* Text contents of the square annotation
|
|
1330
|
+
*/
|
|
1331
|
+
contents?: string;
|
|
1729
1332
|
/**
|
|
1730
1333
|
* flags of square annotation
|
|
1731
1334
|
*/
|
|
@@ -1768,7 +1371,7 @@ interface PdfSquareAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1768
1371
|
*
|
|
1769
1372
|
* @public
|
|
1770
1373
|
*/
|
|
1771
|
-
interface PdfSquigglyAnnoObject extends PdfAnnotationObjectBase {
|
|
1374
|
+
export interface PdfSquigglyAnnoObject extends PdfAnnotationObjectBase {
|
|
1772
1375
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1773
1376
|
type: PdfAnnotationSubtype.SQUIGGLY;
|
|
1774
1377
|
/**
|
|
@@ -1793,7 +1396,7 @@ interface PdfSquigglyAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1793
1396
|
*
|
|
1794
1397
|
* @public
|
|
1795
1398
|
*/
|
|
1796
|
-
interface PdfUnderlineAnnoObject extends PdfAnnotationObjectBase {
|
|
1399
|
+
export interface PdfUnderlineAnnoObject extends PdfAnnotationObjectBase {
|
|
1797
1400
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1798
1401
|
type: PdfAnnotationSubtype.UNDERLINE;
|
|
1799
1402
|
/**
|
|
@@ -1818,7 +1421,7 @@ interface PdfUnderlineAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1818
1421
|
*
|
|
1819
1422
|
* @public
|
|
1820
1423
|
*/
|
|
1821
|
-
interface PdfStrikeOutAnnoObject extends PdfAnnotationObjectBase {
|
|
1424
|
+
export interface PdfStrikeOutAnnoObject extends PdfAnnotationObjectBase {
|
|
1822
1425
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1823
1426
|
type: PdfAnnotationSubtype.STRIKEOUT;
|
|
1824
1427
|
/**
|
|
@@ -1843,7 +1446,7 @@ interface PdfStrikeOutAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1843
1446
|
*
|
|
1844
1447
|
* @public
|
|
1845
1448
|
*/
|
|
1846
|
-
interface PdfCaretAnnoObject extends PdfAnnotationObjectBase {
|
|
1449
|
+
export interface PdfCaretAnnoObject extends PdfAnnotationObjectBase {
|
|
1847
1450
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1848
1451
|
type: PdfAnnotationSubtype.CARET;
|
|
1849
1452
|
}
|
|
@@ -1852,23 +1455,24 @@ interface PdfCaretAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1852
1455
|
*
|
|
1853
1456
|
* @public
|
|
1854
1457
|
*/
|
|
1855
|
-
interface PdfFreeTextAnnoObject extends PdfAnnotationObjectBase {
|
|
1458
|
+
export interface PdfFreeTextAnnoObject extends PdfAnnotationObjectBase {
|
|
1856
1459
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1857
1460
|
type: PdfAnnotationSubtype.FREETEXT;
|
|
1858
1461
|
contents: string;
|
|
1462
|
+
richContent?: string;
|
|
1859
1463
|
}
|
|
1860
1464
|
/**
|
|
1861
1465
|
* All annotation that support
|
|
1862
1466
|
*
|
|
1863
1467
|
* @public
|
|
1864
1468
|
*/
|
|
1865
|
-
type PdfSupportedAnnoObject = PdfInkAnnoObject | PdfTextAnnoObject | PdfLinkAnnoObject | PdfPolygonAnnoObject | PdfPolylineAnnoObject | PdfHighlightAnnoObject | PdfLineAnnoObject | PdfWidgetAnnoObject | PdfFileAttachmentAnnoObject | PdfStampAnnoObject | PdfSquareAnnoObject | PdfCircleAnnoObject | PdfSquigglyAnnoObject | PdfUnderlineAnnoObject | PdfStrikeOutAnnoObject | PdfCaretAnnoObject | PdfFreeTextAnnoObject;
|
|
1469
|
+
export type PdfSupportedAnnoObject = PdfInkAnnoObject | PdfTextAnnoObject | PdfLinkAnnoObject | PdfPolygonAnnoObject | PdfPolylineAnnoObject | PdfHighlightAnnoObject | PdfLineAnnoObject | PdfWidgetAnnoObject | PdfFileAttachmentAnnoObject | PdfStampAnnoObject | PdfSquareAnnoObject | PdfCircleAnnoObject | PdfSquigglyAnnoObject | PdfUnderlineAnnoObject | PdfStrikeOutAnnoObject | PdfCaretAnnoObject | PdfFreeTextAnnoObject;
|
|
1866
1470
|
/**
|
|
1867
1471
|
* Pdf annotation that does not support
|
|
1868
1472
|
*
|
|
1869
1473
|
* @public
|
|
1870
1474
|
*/
|
|
1871
|
-
interface PdfUnsupportedAnnoObject extends PdfAnnotationObjectBase {
|
|
1475
|
+
export interface PdfUnsupportedAnnoObject extends PdfAnnotationObjectBase {
|
|
1872
1476
|
type: Exclude<PdfAnnotationSubtype, PdfSupportedAnnoObject['type']>;
|
|
1873
1477
|
}
|
|
1874
1478
|
/**
|
|
@@ -1876,13 +1480,13 @@ interface PdfUnsupportedAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1876
1480
|
*
|
|
1877
1481
|
* @public
|
|
1878
1482
|
*/
|
|
1879
|
-
type PdfAnnotationObject = PdfSupportedAnnoObject | PdfUnsupportedAnnoObject;
|
|
1483
|
+
export type PdfAnnotationObject = PdfSupportedAnnoObject | PdfUnsupportedAnnoObject;
|
|
1880
1484
|
/**
|
|
1881
1485
|
* Pdf attachment
|
|
1882
1486
|
*
|
|
1883
1487
|
* @public
|
|
1884
1488
|
*/
|
|
1885
|
-
interface PdfAttachmentObject {
|
|
1489
|
+
export interface PdfAttachmentObject {
|
|
1886
1490
|
index: number;
|
|
1887
1491
|
name: string;
|
|
1888
1492
|
creationDate: string;
|
|
@@ -1893,7 +1497,7 @@ interface PdfAttachmentObject {
|
|
|
1893
1497
|
*
|
|
1894
1498
|
* @public
|
|
1895
1499
|
*/
|
|
1896
|
-
declare enum PdfEngineFeature {
|
|
1500
|
+
export declare enum PdfEngineFeature {
|
|
1897
1501
|
RenderPage = 0,
|
|
1898
1502
|
RenderPageRect = 1,
|
|
1899
1503
|
Thumbnails = 2,
|
|
@@ -1905,7 +1509,7 @@ declare enum PdfEngineFeature {
|
|
|
1905
1509
|
*
|
|
1906
1510
|
* @public
|
|
1907
1511
|
*/
|
|
1908
|
-
declare enum PdfEngineOperation {
|
|
1512
|
+
export declare enum PdfEngineOperation {
|
|
1909
1513
|
Create = 0,
|
|
1910
1514
|
Read = 1,
|
|
1911
1515
|
Update = 2,
|
|
@@ -1916,7 +1520,7 @@ declare enum PdfEngineOperation {
|
|
|
1916
1520
|
*
|
|
1917
1521
|
* @public
|
|
1918
1522
|
*/
|
|
1919
|
-
declare enum MatchFlag {
|
|
1523
|
+
export declare enum MatchFlag {
|
|
1920
1524
|
None = 0,
|
|
1921
1525
|
MatchCase = 1,
|
|
1922
1526
|
MatchWholeWord = 2,
|
|
@@ -1929,19 +1533,19 @@ declare enum MatchFlag {
|
|
|
1929
1533
|
*
|
|
1930
1534
|
* @public
|
|
1931
1535
|
*/
|
|
1932
|
-
declare function unionFlags(flags: MatchFlag[]): MatchFlag;
|
|
1536
|
+
export declare function unionFlags(flags: MatchFlag[]): MatchFlag;
|
|
1933
1537
|
/**
|
|
1934
1538
|
* Image conversion types
|
|
1935
1539
|
*
|
|
1936
1540
|
* @public
|
|
1937
1541
|
*/
|
|
1938
|
-
type ImageConversionTypes = 'image/webp' | 'image/png' | 'image/jpeg';
|
|
1542
|
+
export type ImageConversionTypes = 'image/webp' | 'image/png' | 'image/jpeg';
|
|
1939
1543
|
/**
|
|
1940
1544
|
* Targe for searching
|
|
1941
1545
|
*
|
|
1942
1546
|
* @public
|
|
1943
1547
|
*/
|
|
1944
|
-
interface SearchTarget {
|
|
1548
|
+
export interface SearchTarget {
|
|
1945
1549
|
keyword: string;
|
|
1946
1550
|
flags: MatchFlag[];
|
|
1947
1551
|
}
|
|
@@ -1953,9 +1557,9 @@ interface SearchTarget {
|
|
|
1953
1557
|
*
|
|
1954
1558
|
* @public
|
|
1955
1559
|
*/
|
|
1956
|
-
declare function compareSearchTarget(targetA: SearchTarget, targetB: SearchTarget): boolean;
|
|
1560
|
+
export declare function compareSearchTarget(targetA: SearchTarget, targetB: SearchTarget): boolean;
|
|
1957
1561
|
/** Context of one hit */
|
|
1958
|
-
interface TextContext {
|
|
1562
|
+
export interface TextContext {
|
|
1959
1563
|
/** Complete words that come *before* the hit (no ellipsis) */
|
|
1960
1564
|
before: string;
|
|
1961
1565
|
/** Exactly the text that matched (case-preserved) */
|
|
@@ -1972,7 +1576,7 @@ interface TextContext {
|
|
|
1972
1576
|
*
|
|
1973
1577
|
* @public
|
|
1974
1578
|
*/
|
|
1975
|
-
interface PageTextSlice {
|
|
1579
|
+
export interface PageTextSlice {
|
|
1976
1580
|
/**
|
|
1977
1581
|
* Index of the pdf page
|
|
1978
1582
|
*/
|
|
@@ -1991,7 +1595,7 @@ interface PageTextSlice {
|
|
|
1991
1595
|
*
|
|
1992
1596
|
* @public
|
|
1993
1597
|
*/
|
|
1994
|
-
interface SearchResult {
|
|
1598
|
+
export interface SearchResult {
|
|
1995
1599
|
/**
|
|
1996
1600
|
* Index of the pdf page
|
|
1997
1601
|
*/
|
|
@@ -2016,7 +1620,7 @@ interface SearchResult {
|
|
|
2016
1620
|
/**
|
|
2017
1621
|
* Results of searching through the entire document
|
|
2018
1622
|
*/
|
|
2019
|
-
interface SearchAllPagesResult {
|
|
1623
|
+
export interface SearchAllPagesResult {
|
|
2020
1624
|
/**
|
|
2021
1625
|
* Array of all search results across all pages
|
|
2022
1626
|
*/
|
|
@@ -2031,7 +1635,7 @@ interface SearchAllPagesResult {
|
|
|
2031
1635
|
*
|
|
2032
1636
|
* @public
|
|
2033
1637
|
*/
|
|
2034
|
-
interface PdfGlyphObject {
|
|
1638
|
+
export interface PdfGlyphObject {
|
|
2035
1639
|
/**
|
|
2036
1640
|
* Origin of the glyph
|
|
2037
1641
|
*/
|
|
@@ -2060,7 +1664,7 @@ interface PdfGlyphObject {
|
|
|
2060
1664
|
*
|
|
2061
1665
|
* @public
|
|
2062
1666
|
*/
|
|
2063
|
-
interface PdfGlyphSlim {
|
|
1667
|
+
export interface PdfGlyphSlim {
|
|
2064
1668
|
/**
|
|
2065
1669
|
* X coordinate of the glyph
|
|
2066
1670
|
*/
|
|
@@ -2087,7 +1691,7 @@ interface PdfGlyphSlim {
|
|
|
2087
1691
|
*
|
|
2088
1692
|
* @public
|
|
2089
1693
|
*/
|
|
2090
|
-
interface PdfRun {
|
|
1694
|
+
export interface PdfRun {
|
|
2091
1695
|
/**
|
|
2092
1696
|
* Rectangle of the run
|
|
2093
1697
|
*/
|
|
@@ -2111,7 +1715,7 @@ interface PdfRun {
|
|
|
2111
1715
|
*
|
|
2112
1716
|
* @public
|
|
2113
1717
|
*/
|
|
2114
|
-
interface PdfPageGeometry {
|
|
1718
|
+
export interface PdfPageGeometry {
|
|
2115
1719
|
/**
|
|
2116
1720
|
* Runs of the page
|
|
2117
1721
|
*/
|
|
@@ -2121,7 +1725,7 @@ interface PdfPageGeometry {
|
|
|
2121
1725
|
* form field value
|
|
2122
1726
|
* @public
|
|
2123
1727
|
*/
|
|
2124
|
-
type FormFieldValue = {
|
|
1728
|
+
export type FormFieldValue = {
|
|
2125
1729
|
kind: 'text';
|
|
2126
1730
|
text: string;
|
|
2127
1731
|
} | {
|
|
@@ -2137,7 +1741,7 @@ type FormFieldValue = {
|
|
|
2137
1741
|
*
|
|
2138
1742
|
* @public
|
|
2139
1743
|
*/
|
|
2140
|
-
interface PdfAnnotationTransformation {
|
|
1744
|
+
export interface PdfAnnotationTransformation {
|
|
2141
1745
|
/**
|
|
2142
1746
|
* Translated offset
|
|
2143
1747
|
*/
|
|
@@ -2152,7 +1756,7 @@ interface PdfAnnotationTransformation {
|
|
|
2152
1756
|
*
|
|
2153
1757
|
* @public
|
|
2154
1758
|
*/
|
|
2155
|
-
interface PdfRenderOptions {
|
|
1759
|
+
export interface PdfRenderOptions {
|
|
2156
1760
|
/**
|
|
2157
1761
|
* Whether needs to render the page with annotations
|
|
2158
1762
|
*/
|
|
@@ -2163,8 +1767,8 @@ interface PdfRenderOptions {
|
|
|
2163
1767
|
*
|
|
2164
1768
|
* @public
|
|
2165
1769
|
*/
|
|
2166
|
-
type PdfFileContent = ArrayBuffer;
|
|
2167
|
-
declare enum PdfPermission {
|
|
1770
|
+
export type PdfFileContent = ArrayBuffer;
|
|
1771
|
+
export declare enum PdfPermission {
|
|
2168
1772
|
PrintDocument = 8,
|
|
2169
1773
|
ModifyContent = 16,
|
|
2170
1774
|
CopyOrExtract = 32,
|
|
@@ -2174,11 +1778,11 @@ declare enum PdfPermission {
|
|
|
2174
1778
|
AssembleDocument = 2048,
|
|
2175
1779
|
PrintHighQuality = 4096
|
|
2176
1780
|
}
|
|
2177
|
-
declare enum PdfPageFlattenFlag {
|
|
1781
|
+
export declare enum PdfPageFlattenFlag {
|
|
2178
1782
|
Display = 0,
|
|
2179
1783
|
Print = 1
|
|
2180
1784
|
}
|
|
2181
|
-
declare enum PdfPageFlattenResult {
|
|
1785
|
+
export declare enum PdfPageFlattenResult {
|
|
2182
1786
|
Fail = 0,
|
|
2183
1787
|
Success = 1,
|
|
2184
1788
|
NothingToDo = 2
|
|
@@ -2188,13 +1792,13 @@ declare enum PdfPageFlattenResult {
|
|
|
2188
1792
|
*
|
|
2189
1793
|
* @public
|
|
2190
1794
|
*/
|
|
2191
|
-
interface PdfFileWithoutContent {
|
|
1795
|
+
export interface PdfFileWithoutContent {
|
|
2192
1796
|
/**
|
|
2193
1797
|
* id of file
|
|
2194
1798
|
*/
|
|
2195
1799
|
id: string;
|
|
2196
1800
|
}
|
|
2197
|
-
interface PdfFileLoader extends PdfFileWithoutContent {
|
|
1801
|
+
export interface PdfFileLoader extends PdfFileWithoutContent {
|
|
2198
1802
|
/**
|
|
2199
1803
|
* length of file
|
|
2200
1804
|
*/
|
|
@@ -2212,20 +1816,20 @@ interface PdfFileLoader extends PdfFileWithoutContent {
|
|
|
2212
1816
|
*
|
|
2213
1817
|
* @public
|
|
2214
1818
|
*/
|
|
2215
|
-
interface PdfFile extends PdfFileWithoutContent {
|
|
1819
|
+
export interface PdfFile extends PdfFileWithoutContent {
|
|
2216
1820
|
/**
|
|
2217
1821
|
* content of file
|
|
2218
1822
|
*/
|
|
2219
1823
|
content: PdfFileContent;
|
|
2220
1824
|
}
|
|
2221
|
-
interface PdfFileUrl extends PdfFileWithoutContent {
|
|
1825
|
+
export interface PdfFileUrl extends PdfFileWithoutContent {
|
|
2222
1826
|
url: string;
|
|
2223
1827
|
}
|
|
2224
|
-
interface PdfUrlOptions {
|
|
1828
|
+
export interface PdfUrlOptions {
|
|
2225
1829
|
mode?: 'auto' | 'range-request' | 'full-fetch';
|
|
2226
1830
|
password?: string;
|
|
2227
1831
|
}
|
|
2228
|
-
declare enum PdfErrorCode {
|
|
1832
|
+
export declare enum PdfErrorCode {
|
|
2229
1833
|
Ok = 0,// #define FPDF_ERR_SUCCESS 0 // No error.
|
|
2230
1834
|
Unknown = 1,// #define FPDF_ERR_UNKNOWN 1 // Unknown error.
|
|
2231
1835
|
NotFound = 2,// #define FPDF_ERR_FILE 2 // File not found or could not be opened.
|
|
@@ -2256,13 +1860,13 @@ declare enum PdfErrorCode {
|
|
|
2256
1860
|
CantSelectOption = 27,
|
|
2257
1861
|
CantCheckField = 28
|
|
2258
1862
|
}
|
|
2259
|
-
interface PdfErrorReason {
|
|
1863
|
+
export interface PdfErrorReason {
|
|
2260
1864
|
code: PdfErrorCode;
|
|
2261
1865
|
message: string;
|
|
2262
1866
|
}
|
|
2263
|
-
type PdfEngineError = TaskError<PdfErrorReason>;
|
|
2264
|
-
type PdfTask<R> = Task<R, PdfErrorReason>;
|
|
2265
|
-
declare class PdfTaskHelper {
|
|
1867
|
+
export type PdfEngineError = TaskError<PdfErrorReason>;
|
|
1868
|
+
export type PdfTask<R> = Task<R, PdfErrorReason>;
|
|
1869
|
+
export declare class PdfTaskHelper {
|
|
2266
1870
|
/**
|
|
2267
1871
|
* Create a task
|
|
2268
1872
|
* @returns new task
|
|
@@ -2292,7 +1896,7 @@ declare class PdfTaskHelper {
|
|
|
2292
1896
|
*
|
|
2293
1897
|
* @public
|
|
2294
1898
|
*/
|
|
2295
|
-
interface PdfEngine<T = Blob> {
|
|
1899
|
+
export interface PdfEngine<T = Blob> {
|
|
2296
1900
|
/**
|
|
2297
1901
|
* Check whether pdf engine supports this feature
|
|
2298
1902
|
* @param feature - which feature want to check
|
|
@@ -2571,52 +2175,17 @@ interface PdfEngine<T = Blob> {
|
|
|
2571
2175
|
*
|
|
2572
2176
|
* @public
|
|
2573
2177
|
*/
|
|
2574
|
-
type PdfEngineMethodName = keyof Required<PdfEngine>;
|
|
2178
|
+
export type PdfEngineMethodName = keyof Required<PdfEngine>;
|
|
2575
2179
|
/**
|
|
2576
2180
|
* Arguments of PdfEngine method
|
|
2577
2181
|
*
|
|
2578
2182
|
* @public
|
|
2579
2183
|
*/
|
|
2580
|
-
type PdfEngineMethodArgs<P extends PdfEngineMethodName> = Readonly<Parameters<Required<PdfEngine>[P]>>;
|
|
2184
|
+
export type PdfEngineMethodArgs<P extends PdfEngineMethodName> = Readonly<Parameters<Required<PdfEngine>[P]>>;
|
|
2581
2185
|
/**
|
|
2582
2186
|
* Return type of PdfEngine method
|
|
2583
2187
|
*
|
|
2584
2188
|
* @public
|
|
2585
2189
|
*/
|
|
2586
|
-
type PdfEngineMethodReturnType<P extends PdfEngineMethodName> = ReturnType<Required<PdfEngine>[P]>;
|
|
2587
|
-
|
|
2588
|
-
/**
|
|
2589
|
-
* Parse a PDF date string **D:YYYYMMDDHHmmSSOHH'mm'** to ISO-8601.
|
|
2590
|
-
*
|
|
2591
|
-
* Returns `undefined` if the input is malformed.
|
|
2592
|
-
*
|
|
2593
|
-
* @public
|
|
2594
|
-
*/
|
|
2595
|
-
declare function pdfDateToDate(pdf?: string): Date | undefined;
|
|
2596
|
-
/**
|
|
2597
|
-
* Convert a date to a PDF date string
|
|
2598
|
-
* @param date - date to convert
|
|
2599
|
-
* @returns PDF date string
|
|
2600
|
-
*
|
|
2601
|
-
* @public
|
|
2602
|
-
*/
|
|
2603
|
-
declare function dateToPdfDate(date?: Date): string;
|
|
2604
|
-
|
|
2605
|
-
/**
|
|
2606
|
-
* Library contains the common definitions of data types and logic
|
|
2607
|
-
*
|
|
2608
|
-
* @remarks
|
|
2609
|
-
* The `@embedpdf/models` defines the interface and classes which are used to
|
|
2610
|
-
* handling PDF files.
|
|
2611
|
-
*
|
|
2612
|
-
* @packageDocumentation
|
|
2613
|
-
*/
|
|
2614
|
-
|
|
2615
|
-
/**
|
|
2616
|
-
* ignore will do nothing when called.
|
|
2617
|
-
*
|
|
2618
|
-
* @public
|
|
2619
|
-
*/
|
|
2620
|
-
declare function ignore(): void;
|
|
2621
|
-
|
|
2622
|
-
export { AllLogger, AppearanceMode, type Box, ConsoleLogger, type FormFieldValue, type ImageConversionTypes, LevelLogger, LogLevel, type Logger, MatchFlag, type Matrix, NoopLogger, PDF_FORM_FIELD_FLAG, PDF_FORM_FIELD_TYPE, type PageTextSlice, type PdfActionObject, PdfActionType, type PdfAlphaColor, PdfAnnotationBorderStyle, PdfAnnotationColorType, PdfAnnotationFlagName, PdfAnnotationFlags, type PdfAnnotationObject, type PdfAnnotationObjectBase, PdfAnnotationObjectStatus, PdfAnnotationState, PdfAnnotationStateModel, PdfAnnotationSubtype, PdfAnnotationSubtypeName, type PdfAnnotationTransformation, type PdfAttachmentObject, PdfBomOrZwnbsp, type PdfBookmarkObject, type PdfBookmarksObject, type PdfCaretAnnoObject, type PdfCircleAnnoObject, type PdfDestinationObject, type PdfDocumentObject, type PdfEngine, type PdfEngineError, PdfEngineFeature, type PdfEngineMethodArgs, type PdfEngineMethodName, type PdfEngineMethodReturnType, PdfEngineOperation, PdfErrorCode, type PdfErrorReason, type PdfFile, type PdfFileAttachmentAnnoObject, type PdfFileContent, type PdfFileLoader, type PdfFileUrl, type PdfFileWithoutContent, type PdfFormObject, type PdfFreeTextAnnoObject, type PdfGlyphObject, type PdfGlyphSlim, type PdfHighlightAnnoObject, type PdfImage, type PdfImageObject, type PdfInkAnnoObject, type PdfInkListObject, type PdfLineAnnoObject, type PdfLinkAnnoObject, type PdfLinkTarget, type PdfMetadataObject, PdfNonCharacterFFFE, PdfNonCharacterFFFF, PdfPageFlattenFlag, PdfPageFlattenResult, type PdfPageGeometry, type PdfPageObject, PdfPageObjectType, type PdfPageObjectWithRotatedSize, type PdfPathObject, PdfPermission, type PdfPolygonAnnoObject, type PdfPolylineAnnoObject, type PdfPopupAnnoObject, type PdfRenderOptions, type PdfRun, type PdfSegmentObject, PdfSegmentObjectType, type PdfSignatureObject, PdfSoftHyphenMarker, type PdfSquareAnnoObject, type PdfSquigglyAnnoObject, type PdfStampAnnoObject, type PdfStampAnnoObjectContents, type PdfStrikeOutAnnoObject, type PdfSupportedAnnoObject, type PdfTask, PdfTaskHelper, type PdfTextAnnoObject, type PdfTextRectObject, type PdfTransformMatrix, type PdfUnderlineAnnoObject, type PdfUnsupportedAnnoObject, PdfUnwantedTextMarkers, PdfUnwantedTextRegex, type PdfUrlOptions, type PdfWidgetAnnoField, type PdfWidgetAnnoObject, type PdfWidgetAnnoOption, PdfWordJoiner, PdfZeroWidthSpace, PdfZoomMode, PerfLogger, type Position, type Quad, type Rect, type RejectedCallback, type ResolvedCallback, Rotation, type SearchAllPagesResult, type SearchResult, type SearchTarget, type Size, Task, TaskAbortedError, type TaskError, TaskRejectedError, type TaskReturn, type TaskSettledResult, TaskStage, type TaskState, type TextContext, type WebAlphaColor, boundingRect, calculateAngle, calculateDegree, compareSearchTarget, dateToPdfDate, flagsToNames, ignore, makeMatrix, namesToFlags, pdfAlphaColorToWebAlphaColor, pdfDateToDate, quadToRect, rectToQuad, restoreOffset, restorePosition, restoreRect, rotatePosition, rotateRect, scalePosition, scaleRect, stripPdfUnwantedMarkers, swap, toIntPos, toIntRect, toIntSize, transformPosition, transformRect, transformSize, unionFlags, webAlphaColorToPdfAlphaColor };
|
|
2190
|
+
export type PdfEngineMethodReturnType<P extends PdfEngineMethodName> = ReturnType<Required<PdfEngine>[P]>;
|
|
2191
|
+
export {};
|