@embedpdf/models 2.4.1 → 2.6.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/geometry.d.ts +73 -0
- package/dist/helpers/font.d.ts +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +87 -11
- package/dist/index.js.map +1 -1
- package/dist/pdf.d.ts +36 -2
- package/package.json +1 -1
package/dist/pdf.d.ts
CHANGED
|
@@ -61,6 +61,11 @@ export interface PdfDocumentObject {
|
|
|
61
61
|
* Use PdfPermissionFlag to check individual permissions.
|
|
62
62
|
*/
|
|
63
63
|
permissions: number;
|
|
64
|
+
/**
|
|
65
|
+
* Whether page rotation was normalized when opening the document.
|
|
66
|
+
* When true, all page coordinates are in 0° space regardless of original rotation.
|
|
67
|
+
*/
|
|
68
|
+
normalizedRotation: boolean;
|
|
64
69
|
}
|
|
65
70
|
/**
|
|
66
71
|
* metadata of pdf document
|
|
@@ -908,6 +913,17 @@ export interface PdfAnnotationObjectBase {
|
|
|
908
913
|
* Rectangle of the annotation
|
|
909
914
|
*/
|
|
910
915
|
rect: Rect;
|
|
916
|
+
/**
|
|
917
|
+
* Rotation angle in degrees (clockwise).
|
|
918
|
+
* When set, the annotation is visually rotated around its center.
|
|
919
|
+
* The rect becomes the axis-aligned bounding box after rotation.
|
|
920
|
+
*/
|
|
921
|
+
rotation?: number;
|
|
922
|
+
/**
|
|
923
|
+
* The original unrotated rectangle of the annotation.
|
|
924
|
+
* This is stored when rotation is applied, allowing accurate editing.
|
|
925
|
+
*/
|
|
926
|
+
unrotatedRect?: Rect;
|
|
911
927
|
/**
|
|
912
928
|
* Custom data of the annotation
|
|
913
929
|
*/
|
|
@@ -1819,11 +1835,11 @@ export interface PdfRedactAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1819
1835
|
*/
|
|
1820
1836
|
segmentRects: Rect[];
|
|
1821
1837
|
/**
|
|
1822
|
-
* Interior color - the
|
|
1838
|
+
* Interior color (IC) - the fill color used to paint the redacted area after redaction is applied
|
|
1823
1839
|
*/
|
|
1824
1840
|
color?: string;
|
|
1825
1841
|
/**
|
|
1826
|
-
* Overlay color - the
|
|
1842
|
+
* Overlay text color - the color of the overlay text displayed on the redacted area
|
|
1827
1843
|
*/
|
|
1828
1844
|
overlayColor?: string;
|
|
1829
1845
|
/**
|
|
@@ -2370,6 +2386,12 @@ export interface PdfOpenDocumentBufferOptions {
|
|
|
2370
2386
|
* Password for the document
|
|
2371
2387
|
*/
|
|
2372
2388
|
password?: string;
|
|
2389
|
+
/**
|
|
2390
|
+
* When true, normalizes page rotation so all coordinates are in 0° space.
|
|
2391
|
+
* The original rotation is preserved in page.rotation for reference.
|
|
2392
|
+
* @default false
|
|
2393
|
+
*/
|
|
2394
|
+
normalizeRotation?: boolean;
|
|
2373
2395
|
}
|
|
2374
2396
|
export interface PdfRequestOptions {
|
|
2375
2397
|
/**
|
|
@@ -2398,6 +2420,12 @@ export interface PdfOpenDocumentUrlOptions {
|
|
|
2398
2420
|
* HTTP request options for fetching the PDF
|
|
2399
2421
|
*/
|
|
2400
2422
|
requestOptions?: PdfRequestOptions;
|
|
2423
|
+
/**
|
|
2424
|
+
* When true, normalizes page rotation so all coordinates are in 0° space.
|
|
2425
|
+
* The original rotation is preserved in page.rotation for reference.
|
|
2426
|
+
* @default false
|
|
2427
|
+
*/
|
|
2428
|
+
normalizeRotation?: boolean;
|
|
2401
2429
|
}
|
|
2402
2430
|
export interface PdfRenderOptions {
|
|
2403
2431
|
/**
|
|
@@ -2446,6 +2474,12 @@ export interface PdfRenderPageAnnotationOptions extends PdfRenderOptions {
|
|
|
2446
2474
|
* Appearance mode normal down or rollover
|
|
2447
2475
|
*/
|
|
2448
2476
|
mode?: AppearanceMode;
|
|
2477
|
+
/**
|
|
2478
|
+
* When true and annotation.unrotatedRect is present, render using the
|
|
2479
|
+
* unrotated path (ignores AP Matrix rotation). Falls back to normal
|
|
2480
|
+
* rendering if unrotatedRect is not available on the annotation.
|
|
2481
|
+
*/
|
|
2482
|
+
unrotated?: boolean;
|
|
2449
2483
|
}
|
|
2450
2484
|
export interface PdfRenderThumbnailOptions extends PdfRenderOptions {
|
|
2451
2485
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/models",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.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",
|