@embedpdf/models 1.0.25 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/pdf.d.ts +37 -1
- package/dist/task.d.ts +2 -0
- package/package.json +1 -1
package/dist/pdf.d.ts
CHANGED
|
@@ -87,6 +87,14 @@ export interface PdfMetadataObject {
|
|
|
87
87
|
* modification date of the document
|
|
88
88
|
*/
|
|
89
89
|
modificationDate: Date | null;
|
|
90
|
+
/**
|
|
91
|
+
* trapped status of the document
|
|
92
|
+
*/
|
|
93
|
+
trapped: PdfTrappedStatus | null;
|
|
94
|
+
/**
|
|
95
|
+
* Non-predefined Info dictionary entries.
|
|
96
|
+
*/
|
|
97
|
+
custom?: Record<string, string | null>;
|
|
90
98
|
}
|
|
91
99
|
/**
|
|
92
100
|
* Unicode **soft-hyphen** marker (`U+00AD`).
|
|
@@ -174,6 +182,29 @@ export declare enum PdfZoomMode {
|
|
|
174
182
|
*/
|
|
175
183
|
FitRectangle = 5
|
|
176
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Trapped status of the document.
|
|
187
|
+
*
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
export declare enum PdfTrappedStatus {
|
|
191
|
+
/**
|
|
192
|
+
* No /Trapped key
|
|
193
|
+
*/
|
|
194
|
+
NotSet = 0,
|
|
195
|
+
/**
|
|
196
|
+
* Explicitly /Trapped /True
|
|
197
|
+
*/
|
|
198
|
+
True = 1,
|
|
199
|
+
/**
|
|
200
|
+
* Explicitly /Trapped /False
|
|
201
|
+
*/
|
|
202
|
+
False = 2,
|
|
203
|
+
/**
|
|
204
|
+
* Explicitly /Trapped /Unknown or invalid
|
|
205
|
+
*/
|
|
206
|
+
Unknown = 3
|
|
207
|
+
}
|
|
177
208
|
/**
|
|
178
209
|
* 12 default fonts for PDF
|
|
179
210
|
*/
|
|
@@ -2109,7 +2140,7 @@ export interface PdfRenderOptions {
|
|
|
2109
2140
|
*/
|
|
2110
2141
|
imageType?: ImageConversionTypes;
|
|
2111
2142
|
/**
|
|
2112
|
-
* Image quality (0-1) for
|
|
2143
|
+
* Image quality (0-1) for jpeg and png
|
|
2113
2144
|
*/
|
|
2114
2145
|
imageQuality?: number;
|
|
2115
2146
|
}
|
|
@@ -2450,6 +2481,11 @@ export interface PdfEngine<T = Blob> {
|
|
|
2450
2481
|
* @returns task that file is closed or not
|
|
2451
2482
|
*/
|
|
2452
2483
|
closeDocument: (doc: PdfDocumentObject) => PdfTask<boolean>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Close all documents
|
|
2486
|
+
* @returns task that all documents are closed or not
|
|
2487
|
+
*/
|
|
2488
|
+
closeAllDocuments: () => PdfTask<boolean>;
|
|
2453
2489
|
}
|
|
2454
2490
|
/**
|
|
2455
2491
|
* Method name of PdfEngine interface
|
package/dist/task.d.ts
CHANGED
|
@@ -82,9 +82,11 @@ export type TaskSettledResult<R, D> = {
|
|
|
82
82
|
reason: D;
|
|
83
83
|
};
|
|
84
84
|
export declare class TaskAbortedError<D> extends Error {
|
|
85
|
+
readonly reason: D;
|
|
85
86
|
constructor(reason: D);
|
|
86
87
|
}
|
|
87
88
|
export declare class TaskRejectedError<D> extends Error {
|
|
89
|
+
readonly reason: D;
|
|
88
90
|
constructor(reason: D);
|
|
89
91
|
}
|
|
90
92
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/models",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared type definitions, data models, and utility helpers (geometry, tasks, logging, PDF primitives) that underpin every package in the EmbedPDF ecosystem.",
|
|
6
6
|
"type": "module",
|