@ironsoftware/ironpdf 2026.3.1 → 2026.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/package.json +3 -3
  2. package/src/index.d.ts +3 -0
  3. package/src/index.d.ts.map +1 -1
  4. package/src/index.js +6 -2
  5. package/src/index.js.map +1 -1
  6. package/src/index.ts +4 -2
  7. package/src/internal/IronPdfEngine.ProtoFiles/chrome_render.proto +6 -0
  8. package/src/internal/IronPdfEngine.ProtoFiles/iron_pdf_service.proto +2 -1
  9. package/src/internal/IronPdfEngine.ProtoFiles/qpdf.proto +16 -0
  10. package/src/internal/generated_proto/iron_pdf_service.d.ts +614 -305
  11. package/src/internal/generated_proto/iron_pdf_service.d.ts.map +1 -1
  12. package/src/internal/generated_proto/iron_pdf_service.ts +614 -305
  13. package/src/internal/generated_proto/ironpdfengineproto/ChromePdfRenderOptionsP.d.ts +15 -0
  14. package/src/internal/generated_proto/ironpdfengineproto/ChromePdfRenderOptionsP.d.ts.map +1 -1
  15. package/src/internal/generated_proto/ironpdfengineproto/ChromePdfRenderOptionsP.ts +15 -0
  16. package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.d.ts +14 -0
  17. package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.d.ts.map +1 -1
  18. package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.ts +18 -0
  19. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.d.ts +10 -0
  20. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.d.ts.map +1 -0
  21. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.js +4 -0
  22. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.js.map +1 -0
  23. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.ts +13 -0
  24. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.d.ts +18 -0
  25. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.d.ts.map +1 -0
  26. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.js +4 -0
  27. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.js.map +1 -0
  28. package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.ts +21 -0
  29. package/src/internal/grpc_layer/chrome/converter.d.ts +10 -0
  30. package/src/internal/grpc_layer/chrome/converter.d.ts.map +1 -1
  31. package/src/internal/grpc_layer/chrome/converter.js +61 -2
  32. package/src/internal/grpc_layer/chrome/converter.js.map +1 -1
  33. package/src/internal/grpc_layer/chrome/converter.ts +67 -0
  34. package/src/internal/grpc_layer/pdfium/annotations.d.ts +30 -0
  35. package/src/internal/grpc_layer/pdfium/annotations.d.ts.map +1 -0
  36. package/src/internal/grpc_layer/pdfium/annotations.js +161 -0
  37. package/src/internal/grpc_layer/pdfium/annotations.js.map +1 -0
  38. package/src/internal/grpc_layer/pdfium/annotations.ts +190 -0
  39. package/src/internal/grpc_layer/pdfium/bookmarks.d.ts +7 -0
  40. package/src/internal/grpc_layer/pdfium/bookmarks.d.ts.map +1 -0
  41. package/src/internal/grpc_layer/pdfium/bookmarks.js +53 -0
  42. package/src/internal/grpc_layer/pdfium/bookmarks.js.map +1 -0
  43. package/src/internal/grpc_layer/pdfium/bookmarks.ts +50 -0
  44. package/src/internal/grpc_layer/pdfium/compress.d.ts +1 -0
  45. package/src/internal/grpc_layer/pdfium/compress.d.ts.map +1 -1
  46. package/src/internal/grpc_layer/pdfium/compress.js +31 -1
  47. package/src/internal/grpc_layer/pdfium/compress.js.map +1 -1
  48. package/src/internal/grpc_layer/pdfium/compress.ts +42 -0
  49. package/src/internal/grpc_layer/pdfium/linearize.d.ts +48 -0
  50. package/src/internal/grpc_layer/pdfium/linearize.d.ts.map +1 -0
  51. package/src/internal/grpc_layer/pdfium/linearize.js +309 -0
  52. package/src/internal/grpc_layer/pdfium/linearize.js.map +1 -0
  53. package/src/internal/grpc_layer/pdfium/linearize.ts +338 -0
  54. package/src/internal/grpc_layer/pdfium/pdfa.d.ts +1 -0
  55. package/src/internal/grpc_layer/pdfium/pdfa.d.ts.map +1 -1
  56. package/src/internal/grpc_layer/pdfium/pdfa.js +22 -1
  57. package/src/internal/grpc_layer/pdfium/pdfa.js.map +1 -1
  58. package/src/internal/grpc_layer/pdfium/pdfa.ts +26 -0
  59. package/src/internal/grpc_layer/pdfium/signing.d.ts +2 -1
  60. package/src/internal/grpc_layer/pdfium/signing.d.ts.map +1 -1
  61. package/src/internal/grpc_layer/pdfium/signing.js +38 -1
  62. package/src/internal/grpc_layer/pdfium/signing.js.map +1 -1
  63. package/src/internal/grpc_layer/pdfium/signing.ts +44 -1
  64. package/src/internal/zod/renderSchema.d.ts.map +1 -1
  65. package/src/internal/zod/renderSchema.js +6 -1
  66. package/src/internal/zod/renderSchema.js.map +1 -1
  67. package/src/internal/zod/renderSchema.ts +6 -1
  68. package/src/public/annotation.d.ts +166 -0
  69. package/src/public/annotation.d.ts.map +1 -0
  70. package/src/public/annotation.js +61 -0
  71. package/src/public/annotation.js.map +1 -0
  72. package/src/public/annotation.ts +166 -0
  73. package/src/public/bookmark.d.ts +25 -0
  74. package/src/public/bookmark.d.ts.map +1 -0
  75. package/src/public/bookmark.js +3 -0
  76. package/src/public/bookmark.js.map +1 -0
  77. package/src/public/bookmark.ts +28 -0
  78. package/src/public/pdfDocument.d.ts +194 -2
  79. package/src/public/pdfDocument.d.ts.map +1 -1
  80. package/src/public/pdfDocument.js +388 -1
  81. package/src/public/pdfDocument.js.map +1 -1
  82. package/src/public/pdfDocument.ts +427 -4
  83. package/src/public/render.d.ts +104 -0
  84. package/src/public/render.d.ts.map +1 -1
  85. package/src/public/render.js +35 -1
  86. package/src/public/render.js.map +1 -1
  87. package/src/public/render.ts +101 -0
  88. package/src/public/signature.d.ts +33 -0
  89. package/src/public/signature.d.ts.map +1 -1
  90. package/src/public/signature.ts +34 -0
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Destination type that controls how a PDF reader displays the target page when a
3
+ * bookmark or internal hyperlink is followed.
4
+ *
5
+ * Mirrors {@code IronPdf.Bookmarks.BookmarkDestinations} on the C# side. The numeric
6
+ * value of each entry is what the engine expects on the wire, so the order must match
7
+ * the C# enum.
8
+ *
9
+ * Corresponds to the PDF 1.7 specification §12.3.2 "Explicit Destinations".
10
+ */
11
+ export declare enum BookmarkDestinations {
12
+ /**
13
+ * Fit the entire destination page within the window (PDF {@code /Fit}).
14
+ * No additional coordinates are used.
15
+ */
16
+ Page = 0,
17
+ /**
18
+ * Scroll to a specific Y coordinate on the destination page while fitting the
19
+ * page width to the window (PDF {@code /FitH}).
20
+ * Uses {@link LinkAnnotation.destinationTop}.
21
+ */
22
+ PageY = 1,
23
+ /**
24
+ * Scroll to a specific X coordinate on the destination page while fitting the
25
+ * page height to the window (PDF {@code /FitV}).
26
+ * Uses {@link LinkAnnotation.destinationLeft}.
27
+ */
28
+ PageX = 2,
29
+ /**
30
+ * Scroll to a specific position and zoom level (PDF {@code /XYZ}).
31
+ * Uses {@link LinkAnnotation.destinationLeft}, {@link LinkAnnotation.destinationTop},
32
+ * and {@link LinkAnnotation.destinationZoom}. A {@code destinationZoom} of 0 means
33
+ * "inherit the current zoom".
34
+ */
35
+ PageZoom = 3,
36
+ /**
37
+ * Fit the specified rectangle of the destination page into the window (PDF {@code /FitR}).
38
+ * Uses {@link LinkAnnotation.destinationLeft}, {@link LinkAnnotation.destinationBottom},
39
+ * {@link LinkAnnotation.destinationRight}, and {@link LinkAnnotation.destinationTop}.
40
+ */
41
+ PageRect = 4,
42
+ /**
43
+ * Fit the bounding box of the destination page into the window (PDF {@code /FitB}).
44
+ */
45
+ PageBounds = 5,
46
+ /**
47
+ * Scroll to a Y coordinate while fitting the bounding box width to the window
48
+ * (PDF {@code /FitBH}). Uses {@link LinkAnnotation.destinationTop}.
49
+ */
50
+ PageBoundsY = 6,
51
+ /**
52
+ * Scroll to an X coordinate while fitting the bounding box height to the window
53
+ * (PDF {@code /FitBV}). Uses {@link LinkAnnotation.destinationLeft}.
54
+ */
55
+ PageBoundsX = 7
56
+ }
57
+ /**
58
+ * Defines a clickable link annotation that navigates to a specific page within the same
59
+ * PDF document. Useful for building custom tables of contents, cross-references, and
60
+ * in-document navigation.
61
+ *
62
+ * Mirrors {@code IronPdf.Annotations.LinkAnnotation} on the C# side.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * // Simple TOC link: from page 0 to page 3
67
+ * await pdf.addLinkAnnotation({
68
+ * pageIndex: 0,
69
+ * destinationPageIndex: 3,
70
+ * x: 72, y: 700,
71
+ * width: 300, height: 18,
72
+ * contents: "Chapter 1 - Introduction",
73
+ * });
74
+ *
75
+ * // Scroll-to-position link: jump to y=400 on page 1
76
+ * await pdf.addLinkAnnotation({
77
+ * pageIndex: 0,
78
+ * destinationPageIndex: 1,
79
+ * destinationType: BookmarkDestinations.PageZoom,
80
+ * destinationTop: 400,
81
+ * destinationZoom: 100,
82
+ * x: 72, y: 650,
83
+ * width: 300, height: 18,
84
+ * });
85
+ * ```
86
+ *
87
+ * <b>Coordinate note:</b> {@code y} sets the <em>bottom</em> edge of the clickable area
88
+ * using PDF coordinates (origin at bottom-left of page).
89
+ */
90
+ export interface LinkAnnotation {
91
+ /** Zero-based index of the page where the link is placed. */
92
+ pageIndex: number;
93
+ /** Zero-based index of the page to navigate to when clicked. */
94
+ destinationPageIndex: number;
95
+ /**
96
+ * Destination type controlling how the target page is displayed.
97
+ * @default BookmarkDestinations.Page
98
+ */
99
+ destinationType?: BookmarkDestinations;
100
+ /**
101
+ * Left coordinate of the destination position, in points.
102
+ * Used by {@link BookmarkDestinations.PageZoom}, {@link BookmarkDestinations.PageX},
103
+ * {@link BookmarkDestinations.PageRect}, and {@link BookmarkDestinations.PageBoundsX}.
104
+ */
105
+ destinationLeft?: number;
106
+ /**
107
+ * Right coordinate of the destination position, in points.
108
+ * Used by {@link BookmarkDestinations.PageRect}.
109
+ */
110
+ destinationRight?: number;
111
+ /**
112
+ * Top coordinate of the destination position, in points.
113
+ * Used by {@link BookmarkDestinations.PageZoom}, {@link BookmarkDestinations.PageY},
114
+ * {@link BookmarkDestinations.PageRect}, and {@link BookmarkDestinations.PageBoundsY}.
115
+ */
116
+ destinationTop?: number;
117
+ /**
118
+ * Bottom coordinate of the destination position, in points.
119
+ * Used by {@link BookmarkDestinations.PageRect}.
120
+ */
121
+ destinationBottom?: number;
122
+ /**
123
+ * Zoom level (in percent) for the destination. Used by
124
+ * {@link BookmarkDestinations.PageZoom}. A value of 0 means inherit the current zoom.
125
+ */
126
+ destinationZoom?: number;
127
+ /**
128
+ * Horizontal X position from the LEFT edge of the page, in points.
129
+ */
130
+ x: number;
131
+ /**
132
+ * Vertical Y position from the BOTTOM edge of the page, in points.
133
+ * PDF coordinate system places Y=0 at the bottom of the page.
134
+ */
135
+ y: number;
136
+ /** Width of the clickable link area, in points. */
137
+ width: number;
138
+ /** Height of the clickable link area, in points. */
139
+ height: number;
140
+ /**
141
+ * Color code for the link border in CSS `#RRGGBB` format.
142
+ * @default undefined (no explicit color)
143
+ */
144
+ colorCode?: string;
145
+ /**
146
+ * Whether the link annotation is hidden from users.
147
+ * @default false
148
+ */
149
+ hidden?: boolean;
150
+ /**
151
+ * Descriptive text content for this link annotation.
152
+ * @default ""
153
+ */
154
+ contents?: string;
155
+ /**
156
+ * Title for this link annotation.
157
+ * @default ""
158
+ */
159
+ title?: string;
160
+ /**
161
+ * Whether the link annotation displays a visible border when clicked.
162
+ * @default false
163
+ */
164
+ showBorder?: boolean;
165
+ }
166
+ //# sourceMappingURL=annotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["annotation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,oBAAY,oBAAoB;IAC/B;;;OAGG;IACH,IAAI,IAAI;IACR;;;;OAIG;IACH,KAAK,IAAI;IACT;;;;OAIG;IACH,KAAK,IAAI;IACT;;;;;OAKG;IACH,QAAQ,IAAI;IACZ;;;;OAIG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,WAAW,IAAI;IACf;;;OAGG;IACH,WAAW,IAAI;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,cAAc;IAC9B,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IACV,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BookmarkDestinations = void 0;
4
+ /**
5
+ * Destination type that controls how a PDF reader displays the target page when a
6
+ * bookmark or internal hyperlink is followed.
7
+ *
8
+ * Mirrors {@code IronPdf.Bookmarks.BookmarkDestinations} on the C# side. The numeric
9
+ * value of each entry is what the engine expects on the wire, so the order must match
10
+ * the C# enum.
11
+ *
12
+ * Corresponds to the PDF 1.7 specification §12.3.2 "Explicit Destinations".
13
+ */
14
+ var BookmarkDestinations;
15
+ (function (BookmarkDestinations) {
16
+ /**
17
+ * Fit the entire destination page within the window (PDF {@code /Fit}).
18
+ * No additional coordinates are used.
19
+ */
20
+ BookmarkDestinations[BookmarkDestinations["Page"] = 0] = "Page";
21
+ /**
22
+ * Scroll to a specific Y coordinate on the destination page while fitting the
23
+ * page width to the window (PDF {@code /FitH}).
24
+ * Uses {@link LinkAnnotation.destinationTop}.
25
+ */
26
+ BookmarkDestinations[BookmarkDestinations["PageY"] = 1] = "PageY";
27
+ /**
28
+ * Scroll to a specific X coordinate on the destination page while fitting the
29
+ * page height to the window (PDF {@code /FitV}).
30
+ * Uses {@link LinkAnnotation.destinationLeft}.
31
+ */
32
+ BookmarkDestinations[BookmarkDestinations["PageX"] = 2] = "PageX";
33
+ /**
34
+ * Scroll to a specific position and zoom level (PDF {@code /XYZ}).
35
+ * Uses {@link LinkAnnotation.destinationLeft}, {@link LinkAnnotation.destinationTop},
36
+ * and {@link LinkAnnotation.destinationZoom}. A {@code destinationZoom} of 0 means
37
+ * "inherit the current zoom".
38
+ */
39
+ BookmarkDestinations[BookmarkDestinations["PageZoom"] = 3] = "PageZoom";
40
+ /**
41
+ * Fit the specified rectangle of the destination page into the window (PDF {@code /FitR}).
42
+ * Uses {@link LinkAnnotation.destinationLeft}, {@link LinkAnnotation.destinationBottom},
43
+ * {@link LinkAnnotation.destinationRight}, and {@link LinkAnnotation.destinationTop}.
44
+ */
45
+ BookmarkDestinations[BookmarkDestinations["PageRect"] = 4] = "PageRect";
46
+ /**
47
+ * Fit the bounding box of the destination page into the window (PDF {@code /FitB}).
48
+ */
49
+ BookmarkDestinations[BookmarkDestinations["PageBounds"] = 5] = "PageBounds";
50
+ /**
51
+ * Scroll to a Y coordinate while fitting the bounding box width to the window
52
+ * (PDF {@code /FitBH}). Uses {@link LinkAnnotation.destinationTop}.
53
+ */
54
+ BookmarkDestinations[BookmarkDestinations["PageBoundsY"] = 6] = "PageBoundsY";
55
+ /**
56
+ * Scroll to an X coordinate while fitting the bounding box height to the window
57
+ * (PDF {@code /FitBV}). Uses {@link LinkAnnotation.destinationLeft}.
58
+ */
59
+ BookmarkDestinations[BookmarkDestinations["PageBoundsX"] = 7] = "PageBoundsX";
60
+ })(BookmarkDestinations = exports.BookmarkDestinations || (exports.BookmarkDestinations = {}));
61
+ //# sourceMappingURL=annotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.js","sourceRoot":"","sources":["annotation.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,IAAY,oBA6CX;AA7CD,WAAY,oBAAoB;IAC/B;;;OAGG;IACH,+DAAQ,CAAA;IACR;;;;OAIG;IACH,iEAAS,CAAA;IACT;;;;OAIG;IACH,iEAAS,CAAA;IACT;;;;;OAKG;IACH,uEAAY,CAAA;IACZ;;;;OAIG;IACH,uEAAY,CAAA;IACZ;;OAEG;IACH,2EAAc,CAAA;IACd;;;OAGG;IACH,6EAAe,CAAA;IACf;;;OAGG;IACH,6EAAe,CAAA;AAChB,CAAC,EA7CW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QA6C/B"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Destination type that controls how a PDF reader displays the target page when a
3
+ * bookmark or internal hyperlink is followed.
4
+ *
5
+ * Mirrors {@code IronPdf.Bookmarks.BookmarkDestinations} on the C# side. The numeric
6
+ * value of each entry is what the engine expects on the wire, so the order must match
7
+ * the C# enum.
8
+ *
9
+ * Corresponds to the PDF 1.7 specification §12.3.2 "Explicit Destinations".
10
+ */
11
+ export enum BookmarkDestinations {
12
+ /**
13
+ * Fit the entire destination page within the window (PDF {@code /Fit}).
14
+ * No additional coordinates are used.
15
+ */
16
+ Page = 0,
17
+ /**
18
+ * Scroll to a specific Y coordinate on the destination page while fitting the
19
+ * page width to the window (PDF {@code /FitH}).
20
+ * Uses {@link LinkAnnotation.destinationTop}.
21
+ */
22
+ PageY = 1,
23
+ /**
24
+ * Scroll to a specific X coordinate on the destination page while fitting the
25
+ * page height to the window (PDF {@code /FitV}).
26
+ * Uses {@link LinkAnnotation.destinationLeft}.
27
+ */
28
+ PageX = 2,
29
+ /**
30
+ * Scroll to a specific position and zoom level (PDF {@code /XYZ}).
31
+ * Uses {@link LinkAnnotation.destinationLeft}, {@link LinkAnnotation.destinationTop},
32
+ * and {@link LinkAnnotation.destinationZoom}. A {@code destinationZoom} of 0 means
33
+ * "inherit the current zoom".
34
+ */
35
+ PageZoom = 3,
36
+ /**
37
+ * Fit the specified rectangle of the destination page into the window (PDF {@code /FitR}).
38
+ * Uses {@link LinkAnnotation.destinationLeft}, {@link LinkAnnotation.destinationBottom},
39
+ * {@link LinkAnnotation.destinationRight}, and {@link LinkAnnotation.destinationTop}.
40
+ */
41
+ PageRect = 4,
42
+ /**
43
+ * Fit the bounding box of the destination page into the window (PDF {@code /FitB}).
44
+ */
45
+ PageBounds = 5,
46
+ /**
47
+ * Scroll to a Y coordinate while fitting the bounding box width to the window
48
+ * (PDF {@code /FitBH}). Uses {@link LinkAnnotation.destinationTop}.
49
+ */
50
+ PageBoundsY = 6,
51
+ /**
52
+ * Scroll to an X coordinate while fitting the bounding box height to the window
53
+ * (PDF {@code /FitBV}). Uses {@link LinkAnnotation.destinationLeft}.
54
+ */
55
+ PageBoundsX = 7,
56
+ }
57
+
58
+ /**
59
+ * Defines a clickable link annotation that navigates to a specific page within the same
60
+ * PDF document. Useful for building custom tables of contents, cross-references, and
61
+ * in-document navigation.
62
+ *
63
+ * Mirrors {@code IronPdf.Annotations.LinkAnnotation} on the C# side.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * // Simple TOC link: from page 0 to page 3
68
+ * await pdf.addLinkAnnotation({
69
+ * pageIndex: 0,
70
+ * destinationPageIndex: 3,
71
+ * x: 72, y: 700,
72
+ * width: 300, height: 18,
73
+ * contents: "Chapter 1 - Introduction",
74
+ * });
75
+ *
76
+ * // Scroll-to-position link: jump to y=400 on page 1
77
+ * await pdf.addLinkAnnotation({
78
+ * pageIndex: 0,
79
+ * destinationPageIndex: 1,
80
+ * destinationType: BookmarkDestinations.PageZoom,
81
+ * destinationTop: 400,
82
+ * destinationZoom: 100,
83
+ * x: 72, y: 650,
84
+ * width: 300, height: 18,
85
+ * });
86
+ * ```
87
+ *
88
+ * <b>Coordinate note:</b> {@code y} sets the <em>bottom</em> edge of the clickable area
89
+ * using PDF coordinates (origin at bottom-left of page).
90
+ */
91
+ export interface LinkAnnotation {
92
+ /** Zero-based index of the page where the link is placed. */
93
+ pageIndex: number;
94
+ /** Zero-based index of the page to navigate to when clicked. */
95
+ destinationPageIndex: number;
96
+ /**
97
+ * Destination type controlling how the target page is displayed.
98
+ * @default BookmarkDestinations.Page
99
+ */
100
+ destinationType?: BookmarkDestinations;
101
+ /**
102
+ * Left coordinate of the destination position, in points.
103
+ * Used by {@link BookmarkDestinations.PageZoom}, {@link BookmarkDestinations.PageX},
104
+ * {@link BookmarkDestinations.PageRect}, and {@link BookmarkDestinations.PageBoundsX}.
105
+ */
106
+ destinationLeft?: number;
107
+ /**
108
+ * Right coordinate of the destination position, in points.
109
+ * Used by {@link BookmarkDestinations.PageRect}.
110
+ */
111
+ destinationRight?: number;
112
+ /**
113
+ * Top coordinate of the destination position, in points.
114
+ * Used by {@link BookmarkDestinations.PageZoom}, {@link BookmarkDestinations.PageY},
115
+ * {@link BookmarkDestinations.PageRect}, and {@link BookmarkDestinations.PageBoundsY}.
116
+ */
117
+ destinationTop?: number;
118
+ /**
119
+ * Bottom coordinate of the destination position, in points.
120
+ * Used by {@link BookmarkDestinations.PageRect}.
121
+ */
122
+ destinationBottom?: number;
123
+ /**
124
+ * Zoom level (in percent) for the destination. Used by
125
+ * {@link BookmarkDestinations.PageZoom}. A value of 0 means inherit the current zoom.
126
+ */
127
+ destinationZoom?: number;
128
+ /**
129
+ * Horizontal X position from the LEFT edge of the page, in points.
130
+ */
131
+ x: number;
132
+ /**
133
+ * Vertical Y position from the BOTTOM edge of the page, in points.
134
+ * PDF coordinate system places Y=0 at the bottom of the page.
135
+ */
136
+ y: number;
137
+ /** Width of the clickable link area, in points. */
138
+ width: number;
139
+ /** Height of the clickable link area, in points. */
140
+ height: number;
141
+ /**
142
+ * Color code for the link border in CSS `#RRGGBB` format.
143
+ * @default undefined (no explicit color)
144
+ */
145
+ colorCode?: string;
146
+ /**
147
+ * Whether the link annotation is hidden from users.
148
+ * @default false
149
+ */
150
+ hidden?: boolean;
151
+ /**
152
+ * Descriptive text content for this link annotation.
153
+ * @default ""
154
+ */
155
+ contents?: string;
156
+ /**
157
+ * Title for this link annotation.
158
+ * @default ""
159
+ */
160
+ title?: string;
161
+ /**
162
+ * Whether the link annotation displays a visible border when clicked.
163
+ * @default false
164
+ */
165
+ showBorder?: boolean;
166
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A single PDF bookmark (outline entry). Mirrors the C# {@code IronPdf.Bookmark}
3
+ * shape — flat structure with parent linkage instead of nested children.
4
+ *
5
+ * <p>Returned by {@link PdfDocument.getBookmarks}. Hierarchy is conveyed via
6
+ * {@link parentItemId} (a bookmark's parent has matching {@link itemId}) and
7
+ * {@link hierarchy} (a path-like string describing depth in the outline tree).</p>
8
+ */
9
+ export interface Bookmark {
10
+ /** Human-readable label shown in the PDF reader's bookmark panel. */
11
+ text: string;
12
+ /** Zero-based page index this bookmark navigates to. */
13
+ pageIndex: number;
14
+ /**
15
+ * Path-like string describing this bookmark's depth in the outline tree.
16
+ * Empty string for roots; nested entries have something like "0/1" or
17
+ * "Chapter 1/Section 1.1" depending on engine encoding.
18
+ */
19
+ hierarchy: string;
20
+ /** Stable identifier for this bookmark within the document. */
21
+ itemId: string;
22
+ /** {@link itemId} of the parent bookmark, or empty string for roots. */
23
+ parentItemId: string;
24
+ }
25
+ //# sourceMappingURL=bookmark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookmark.d.ts","sourceRoot":"","sources":["bookmark.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACxB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IAEb,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IAEf,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=bookmark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookmark.js","sourceRoot":"","sources":["bookmark.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * A single PDF bookmark (outline entry). Mirrors the C# {@code IronPdf.Bookmark}
3
+ * shape — flat structure with parent linkage instead of nested children.
4
+ *
5
+ * <p>Returned by {@link PdfDocument.getBookmarks}. Hierarchy is conveyed via
6
+ * {@link parentItemId} (a bookmark's parent has matching {@link itemId}) and
7
+ * {@link hierarchy} (a path-like string describing depth in the outline tree).</p>
8
+ */
9
+ export interface Bookmark {
10
+ /** Human-readable label shown in the PDF reader's bookmark panel. */
11
+ text: string;
12
+
13
+ /** Zero-based page index this bookmark navigates to. */
14
+ pageIndex: number;
15
+
16
+ /**
17
+ * Path-like string describing this bookmark's depth in the outline tree.
18
+ * Empty string for roots; nested entries have something like "0/1" or
19
+ * "Chapter 1/Section 1.1" depending on engine encoding.
20
+ */
21
+ hierarchy: string;
22
+
23
+ /** Stable identifier for this bookmark within the document. */
24
+ itemId: string;
25
+
26
+ /** {@link itemId} of the parent bookmark, or empty string for roots. */
27
+ parentItemId: string;
28
+ }