@ironsoftware/ironpdf 2026.4.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.
- package/package.json +3 -3
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/index.ts +2 -0
- package/src/internal/IronPdfEngine.ProtoFiles/chrome_render.proto +6 -0
- package/src/internal/IronPdfEngine.ProtoFiles/iron_pdf_service.proto +2 -1
- package/src/internal/IronPdfEngine.ProtoFiles/qpdf.proto +16 -0
- package/src/internal/generated_proto/iron_pdf_service.d.ts +614 -305
- package/src/internal/generated_proto/iron_pdf_service.d.ts.map +1 -1
- package/src/internal/generated_proto/iron_pdf_service.ts +614 -305
- package/src/internal/generated_proto/ironpdfengineproto/ChromePdfRenderOptionsP.d.ts +15 -0
- package/src/internal/generated_proto/ironpdfengineproto/ChromePdfRenderOptionsP.d.ts.map +1 -1
- package/src/internal/generated_proto/ironpdfengineproto/ChromePdfRenderOptionsP.ts +15 -0
- package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.d.ts +14 -0
- package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.d.ts.map +1 -1
- package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.ts +18 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.d.ts +10 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.d.ts.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.js +4 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.js.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestIdP.ts +13 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.d.ts +18 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.d.ts.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.js +4 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.js.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfLinearizeInMemoryRequestStreamP.ts +21 -0
- package/src/internal/grpc_layer/chrome/converter.d.ts +10 -0
- package/src/internal/grpc_layer/chrome/converter.d.ts.map +1 -1
- package/src/internal/grpc_layer/chrome/converter.js +61 -2
- package/src/internal/grpc_layer/chrome/converter.js.map +1 -1
- package/src/internal/grpc_layer/chrome/converter.ts +67 -0
- package/src/internal/grpc_layer/pdfium/annotations.d.ts +30 -0
- package/src/internal/grpc_layer/pdfium/annotations.d.ts.map +1 -0
- package/src/internal/grpc_layer/pdfium/annotations.js +161 -0
- package/src/internal/grpc_layer/pdfium/annotations.js.map +1 -0
- package/src/internal/grpc_layer/pdfium/annotations.ts +190 -0
- package/src/internal/grpc_layer/pdfium/bookmarks.d.ts +7 -0
- package/src/internal/grpc_layer/pdfium/bookmarks.d.ts.map +1 -0
- package/src/internal/grpc_layer/pdfium/bookmarks.js +53 -0
- package/src/internal/grpc_layer/pdfium/bookmarks.js.map +1 -0
- package/src/internal/grpc_layer/pdfium/bookmarks.ts +50 -0
- package/src/internal/grpc_layer/pdfium/linearize.d.ts +48 -0
- package/src/internal/grpc_layer/pdfium/linearize.d.ts.map +1 -0
- package/src/internal/grpc_layer/pdfium/linearize.js +309 -0
- package/src/internal/grpc_layer/pdfium/linearize.js.map +1 -0
- package/src/internal/grpc_layer/pdfium/linearize.ts +338 -0
- package/src/internal/zod/renderSchema.d.ts.map +1 -1
- package/src/internal/zod/renderSchema.js +6 -1
- package/src/internal/zod/renderSchema.js.map +1 -1
- package/src/internal/zod/renderSchema.ts +6 -1
- package/src/public/annotation.d.ts +166 -0
- package/src/public/annotation.d.ts.map +1 -0
- package/src/public/annotation.js +61 -0
- package/src/public/annotation.js.map +1 -0
- package/src/public/annotation.ts +166 -0
- package/src/public/bookmark.d.ts +25 -0
- package/src/public/bookmark.d.ts.map +1 -0
- package/src/public/bookmark.js +3 -0
- package/src/public/bookmark.js.map +1 -0
- package/src/public/bookmark.ts +28 -0
- package/src/public/pdfDocument.d.ts +168 -1
- package/src/public/pdfDocument.d.ts.map +1 -1
- package/src/public/pdfDocument.js +341 -17
- package/src/public/pdfDocument.js.map +1 -1
- package/src/public/pdfDocument.ts +364 -18
- package/src/public/render.d.ts +104 -0
- package/src/public/render.d.ts.map +1 -1
- package/src/public/render.js +35 -1
- package/src/public/render.js.map +1 -1
- package/src/public/render.ts +101 -0
package/src/public/render.d.ts
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
import { PdfPaperOrientation, PdfPaperSize } from "./paper";
|
|
2
2
|
import { HtmlAffix, TextAffix } from "./affix";
|
|
3
3
|
import { CssMediaType, FitToPaperModes, MarginConfig, UseMargins, TableOfContentsTypes } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Represents the rendered location of an HTML element within a PDF document.
|
|
6
|
+
*
|
|
7
|
+
* Returned by {@code PdfDocument.getElementLocations()} after rendering HTML with
|
|
8
|
+
* {@link ChromePdfRenderOptions.elementQuerySelectors} configured.
|
|
9
|
+
*
|
|
10
|
+
* Mirrors {@code IronPdf.RenderedElementLocation} on the C# side.
|
|
11
|
+
*/
|
|
12
|
+
export interface RenderedElementLocation {
|
|
13
|
+
/**
|
|
14
|
+
* The text content of the matched element.
|
|
15
|
+
*/
|
|
16
|
+
text: string;
|
|
17
|
+
/**
|
|
18
|
+
* The zero-based page index where the element was rendered.
|
|
19
|
+
*/
|
|
20
|
+
pageIndex: number;
|
|
21
|
+
/**
|
|
22
|
+
* The bounding rectangle of the annotation marker on the page, in PDF points (1/72 inch).
|
|
23
|
+
* Coordinate origin is the bottom-left corner of the page. The rectangle corresponds to
|
|
24
|
+
* the injected anchor marker placed at the start of the matched element.
|
|
25
|
+
*/
|
|
26
|
+
rectangle: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The original index of the element in document order among all matched elements.
|
|
34
|
+
*/
|
|
35
|
+
elementIndex: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Specifies the linearization strategy to use when producing a linearized
|
|
39
|
+
* (web-optimized) PDF.
|
|
40
|
+
*
|
|
41
|
+
* Mirrors {@code IronPdf.LinearizationMode} on the C# side.
|
|
42
|
+
*/
|
|
43
|
+
export declare enum LinearizationMode {
|
|
44
|
+
/**
|
|
45
|
+
* Automatically selects the optimal linearization method based on system capabilities.
|
|
46
|
+
*
|
|
47
|
+
* Behavior:
|
|
48
|
+
* 1. First attempts {@link FileBased} linearization.
|
|
49
|
+
* 2. If disk access is restricted (e.g. limited permissions, sandboxed environment),
|
|
50
|
+
* automatically falls back to {@link InMemory}.
|
|
51
|
+
*
|
|
52
|
+
* Recommended default for most applications.
|
|
53
|
+
*/
|
|
54
|
+
Automatic = 0,
|
|
55
|
+
/**
|
|
56
|
+
* Performs linearization entirely in memory without any disk I/O operations.
|
|
57
|
+
*
|
|
58
|
+
* Use when:
|
|
59
|
+
* - Compliance requirements mandate zero disk I/O (e.g. HIPAA, PCI-DSS)
|
|
60
|
+
* - Sandboxed or restricted environments without disk write permissions
|
|
61
|
+
* - Cloud-based environments where disk I/O introduces latency
|
|
62
|
+
*/
|
|
63
|
+
InMemory = 1,
|
|
64
|
+
/**
|
|
65
|
+
* Performs linearization using temporary file operations on disk.
|
|
66
|
+
* Requires write permissions to the system temporary directory.
|
|
67
|
+
*/
|
|
68
|
+
FileBased = 2
|
|
69
|
+
}
|
|
4
70
|
/**
|
|
5
71
|
* Html or Url To PDF output options for {@link PdfGenerator} and {@link PdfDocument} static method.
|
|
6
72
|
* Specify options such as Paper-Size, DPI and other Chromium specific browser setup options.
|
|
@@ -101,6 +167,44 @@ export interface ChromePdfRenderOptions {
|
|
|
101
167
|
* @default {@link UseMargins.LeftAndRight}
|
|
102
168
|
*/
|
|
103
169
|
useMarginsOnHeaderAndFooter?: UseMargins | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* If true, auto-generate PDF outline (bookmarks) from the HTML heading structure.
|
|
172
|
+
* Use {@link autoBookmarkMinHeadingLevel} / {@link autoBookmarkMaxHeadingLevel} to control
|
|
173
|
+
* which heading levels are included (1 = h1, 6 = h6). Use {@link autoBookmarkCssSelectors}
|
|
174
|
+
* to include additional non-heading elements (e.g. {@code ".chapter-title"}).
|
|
175
|
+
*
|
|
176
|
+
* @default false
|
|
177
|
+
*/
|
|
178
|
+
autoBookmarksFromHeadings?: boolean | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* Minimum heading level (inclusive) to include in auto-generated bookmarks.
|
|
181
|
+
* Only used when {@link autoBookmarksFromHeadings} is true.
|
|
182
|
+
*
|
|
183
|
+
* @default 1
|
|
184
|
+
*/
|
|
185
|
+
autoBookmarkMinHeadingLevel?: number | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Maximum heading level (inclusive) to include in auto-generated bookmarks.
|
|
188
|
+
* Only used when {@link autoBookmarksFromHeadings} is true.
|
|
189
|
+
*
|
|
190
|
+
* @default 6
|
|
191
|
+
*/
|
|
192
|
+
autoBookmarkMaxHeadingLevel?: number | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Additional CSS selectors whose matching elements will be included as auto-bookmarks
|
|
195
|
+
* (in addition to the heading range). Only used when {@link autoBookmarksFromHeadings} is true.
|
|
196
|
+
* Example: {@code [".chapter-title", "[data-bookmark]"]}.
|
|
197
|
+
*/
|
|
198
|
+
autoBookmarkCssSelectors?: string[] | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* CSS selectors whose matching HTML elements should be tracked during rendering so their
|
|
201
|
+
* rendered page positions can later be retrieved by the engine.
|
|
202
|
+
*
|
|
203
|
+
* <b>Note:</b> retrieval of the per-element locations from the Node client is not yet
|
|
204
|
+
* supported. Setting this option still enables engine-side tracking (and any downstream
|
|
205
|
+
* effects such as auto-bookmarks for those selectors).
|
|
206
|
+
*/
|
|
207
|
+
elementQuerySelectors?: string[] | undefined;
|
|
104
208
|
}
|
|
105
209
|
/**
|
|
106
210
|
* A managed wrapper of wait-for configurations. see {@link ChromePdfRenderOptions.waitFor}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EACC,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,UAAU,EACV,oBAAoB,EAC3B,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IAEtC;;;;OAIG;IACH,sBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9C;;;;;;OAMG;IACI,YAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C;;;;;;OAMG;IACH,gBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IAC7C;;;;OAIG;IACH,SAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACnD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,oBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5C;;;OAGG;IACH,OAAQ,CAAC,EAA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AC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC"}
|
package/src/public/render.js
CHANGED
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultChromePdfRenderOptions = exports.WaitForType = void 0;
|
|
3
|
+
exports.defaultChromePdfRenderOptions = exports.WaitForType = exports.LinearizationMode = void 0;
|
|
4
4
|
const paper_1 = require("./paper");
|
|
5
5
|
const types_1 = require("./types");
|
|
6
|
+
/**
|
|
7
|
+
* Specifies the linearization strategy to use when producing a linearized
|
|
8
|
+
* (web-optimized) PDF.
|
|
9
|
+
*
|
|
10
|
+
* Mirrors {@code IronPdf.LinearizationMode} on the C# side.
|
|
11
|
+
*/
|
|
12
|
+
var LinearizationMode;
|
|
13
|
+
(function (LinearizationMode) {
|
|
14
|
+
/**
|
|
15
|
+
* Automatically selects the optimal linearization method based on system capabilities.
|
|
16
|
+
*
|
|
17
|
+
* Behavior:
|
|
18
|
+
* 1. First attempts {@link FileBased} linearization.
|
|
19
|
+
* 2. If disk access is restricted (e.g. limited permissions, sandboxed environment),
|
|
20
|
+
* automatically falls back to {@link InMemory}.
|
|
21
|
+
*
|
|
22
|
+
* Recommended default for most applications.
|
|
23
|
+
*/
|
|
24
|
+
LinearizationMode[LinearizationMode["Automatic"] = 0] = "Automatic";
|
|
25
|
+
/**
|
|
26
|
+
* Performs linearization entirely in memory without any disk I/O operations.
|
|
27
|
+
*
|
|
28
|
+
* Use when:
|
|
29
|
+
* - Compliance requirements mandate zero disk I/O (e.g. HIPAA, PCI-DSS)
|
|
30
|
+
* - Sandboxed or restricted environments without disk write permissions
|
|
31
|
+
* - Cloud-based environments where disk I/O introduces latency
|
|
32
|
+
*/
|
|
33
|
+
LinearizationMode[LinearizationMode["InMemory"] = 1] = "InMemory";
|
|
34
|
+
/**
|
|
35
|
+
* Performs linearization using temporary file operations on disk.
|
|
36
|
+
* Requires write permissions to the system temporary directory.
|
|
37
|
+
*/
|
|
38
|
+
LinearizationMode[LinearizationMode["FileBased"] = 2] = "FileBased";
|
|
39
|
+
})(LinearizationMode = exports.LinearizationMode || (exports.LinearizationMode = {}));
|
|
6
40
|
/**
|
|
7
41
|
* A wait-for type. see {@link ChromePdfRenderOptions.waitFor} also {@link WaitFor}
|
|
8
42
|
*/
|
package/src/public/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["render.ts"],"names":[],"mappings":";;;AAAA,mCAAuE;AAEvE,mCAMiB;
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["render.ts"],"names":[],"mappings":";;;AAAA,mCAAuE;AAEvE,mCAMiB;AA+BjB;;;;;GAKG;AACH,IAAY,iBA0BX;AA1BD,WAAY,iBAAiB;IAC5B;;;;;;;;;OASG;IACH,mEAAa,CAAA;IACb;;;;;;;OAOG;IACH,iEAAY,CAAA;IACZ;;;OAGG;IACH,mEAAa,CAAA;AACd,CAAC,EA1BW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA0B5B;AA8JD;;GAEG;AACH,IAAY,WAQX;AARD,WAAY,WAAW;IACtB,oCAAqB,CAAA;IACrB,wCAAyB,CAAA;IACzB,0CAA2B,CAAA;IAC3B,4CAA6B,CAAA;IAC7B,4CAA6B,CAAA;IAC7B,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;AAC5B,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AAiGD,SAAgB,6BAA6B;IACrC,OAAO;QACC,YAAY,EAAE,oBAAY,CAAC,KAAK;QAChC,gBAAgB,EAAE,IAAI;QACtB,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,4BAAoB,CAAC,IAAI;QAC1C,cAAc,EAAE,uBAAe,CAAC,OAAO;QACrD,SAAS,EAAE,KAAK;QAChB,aAAa,EAAE,OAAO;QACtB,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAChD,SAAS,EAAE,iBAAS,CAAC,EAAE;QACvB,gBAAgB,EAAE,2BAAmB,CAAC,QAAQ;QAC9C,oBAAoB,EAAE,IAAI;QAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE;QACrD,uBAAuB;QACvB,wBAAwB;QACxB,aAAa;QACb,sBAAsB,EAAE,IAAI;QACd,YAAY,EAAE,EAAE;QAChB,2BAA2B,EAAE,kBAAU,CAAC,GAAG;KAClD,CAAC;AACV,CAAC;AArBD,sEAqBC"}
|
package/src/public/render.ts
CHANGED
|
@@ -8,6 +8,69 @@ import {
|
|
|
8
8
|
TableOfContentsTypes,
|
|
9
9
|
} from "./types";
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Represents the rendered location of an HTML element within a PDF document.
|
|
13
|
+
*
|
|
14
|
+
* Returned by {@code PdfDocument.getElementLocations()} after rendering HTML with
|
|
15
|
+
* {@link ChromePdfRenderOptions.elementQuerySelectors} configured.
|
|
16
|
+
*
|
|
17
|
+
* Mirrors {@code IronPdf.RenderedElementLocation} on the C# side.
|
|
18
|
+
*/
|
|
19
|
+
export interface RenderedElementLocation {
|
|
20
|
+
/**
|
|
21
|
+
* The text content of the matched element.
|
|
22
|
+
*/
|
|
23
|
+
text: string;
|
|
24
|
+
/**
|
|
25
|
+
* The zero-based page index where the element was rendered.
|
|
26
|
+
*/
|
|
27
|
+
pageIndex: number;
|
|
28
|
+
/**
|
|
29
|
+
* The bounding rectangle of the annotation marker on the page, in PDF points (1/72 inch).
|
|
30
|
+
* Coordinate origin is the bottom-left corner of the page. The rectangle corresponds to
|
|
31
|
+
* the injected anchor marker placed at the start of the matched element.
|
|
32
|
+
*/
|
|
33
|
+
rectangle: { x: number; y: number; width: number; height: number };
|
|
34
|
+
/**
|
|
35
|
+
* The original index of the element in document order among all matched elements.
|
|
36
|
+
*/
|
|
37
|
+
elementIndex: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Specifies the linearization strategy to use when producing a linearized
|
|
42
|
+
* (web-optimized) PDF.
|
|
43
|
+
*
|
|
44
|
+
* Mirrors {@code IronPdf.LinearizationMode} on the C# side.
|
|
45
|
+
*/
|
|
46
|
+
export enum LinearizationMode {
|
|
47
|
+
/**
|
|
48
|
+
* Automatically selects the optimal linearization method based on system capabilities.
|
|
49
|
+
*
|
|
50
|
+
* Behavior:
|
|
51
|
+
* 1. First attempts {@link FileBased} linearization.
|
|
52
|
+
* 2. If disk access is restricted (e.g. limited permissions, sandboxed environment),
|
|
53
|
+
* automatically falls back to {@link InMemory}.
|
|
54
|
+
*
|
|
55
|
+
* Recommended default for most applications.
|
|
56
|
+
*/
|
|
57
|
+
Automatic = 0,
|
|
58
|
+
/**
|
|
59
|
+
* Performs linearization entirely in memory without any disk I/O operations.
|
|
60
|
+
*
|
|
61
|
+
* Use when:
|
|
62
|
+
* - Compliance requirements mandate zero disk I/O (e.g. HIPAA, PCI-DSS)
|
|
63
|
+
* - Sandboxed or restricted environments without disk write permissions
|
|
64
|
+
* - Cloud-based environments where disk I/O introduces latency
|
|
65
|
+
*/
|
|
66
|
+
InMemory = 1,
|
|
67
|
+
/**
|
|
68
|
+
* Performs linearization using temporary file operations on disk.
|
|
69
|
+
* Requires write permissions to the system temporary directory.
|
|
70
|
+
*/
|
|
71
|
+
FileBased = 2,
|
|
72
|
+
}
|
|
73
|
+
|
|
11
74
|
/**
|
|
12
75
|
* Html or Url To PDF output options for {@link PdfGenerator} and {@link PdfDocument} static method.
|
|
13
76
|
* Specify options such as Paper-Size, DPI and other Chromium specific browser setup options.
|
|
@@ -112,6 +175,44 @@ export interface ChromePdfRenderOptions {
|
|
|
112
175
|
* @default {@link UseMargins.LeftAndRight}
|
|
113
176
|
*/
|
|
114
177
|
useMarginsOnHeaderAndFooter?: UseMargins | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* If true, auto-generate PDF outline (bookmarks) from the HTML heading structure.
|
|
180
|
+
* Use {@link autoBookmarkMinHeadingLevel} / {@link autoBookmarkMaxHeadingLevel} to control
|
|
181
|
+
* which heading levels are included (1 = h1, 6 = h6). Use {@link autoBookmarkCssSelectors}
|
|
182
|
+
* to include additional non-heading elements (e.g. {@code ".chapter-title"}).
|
|
183
|
+
*
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
autoBookmarksFromHeadings?: boolean | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* Minimum heading level (inclusive) to include in auto-generated bookmarks.
|
|
189
|
+
* Only used when {@link autoBookmarksFromHeadings} is true.
|
|
190
|
+
*
|
|
191
|
+
* @default 1
|
|
192
|
+
*/
|
|
193
|
+
autoBookmarkMinHeadingLevel?: number | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Maximum heading level (inclusive) to include in auto-generated bookmarks.
|
|
196
|
+
* Only used when {@link autoBookmarksFromHeadings} is true.
|
|
197
|
+
*
|
|
198
|
+
* @default 6
|
|
199
|
+
*/
|
|
200
|
+
autoBookmarkMaxHeadingLevel?: number | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* Additional CSS selectors whose matching elements will be included as auto-bookmarks
|
|
203
|
+
* (in addition to the heading range). Only used when {@link autoBookmarksFromHeadings} is true.
|
|
204
|
+
* Example: {@code [".chapter-title", "[data-bookmark]"]}.
|
|
205
|
+
*/
|
|
206
|
+
autoBookmarkCssSelectors?: string[] | undefined;
|
|
207
|
+
/**
|
|
208
|
+
* CSS selectors whose matching HTML elements should be tracked during rendering so their
|
|
209
|
+
* rendered page positions can later be retrieved by the engine.
|
|
210
|
+
*
|
|
211
|
+
* <b>Note:</b> retrieval of the per-element locations from the Node client is not yet
|
|
212
|
+
* supported. Setting this option still enables engine-side tracking (and any downstream
|
|
213
|
+
* effects such as auto-bookmarks for those selectors).
|
|
214
|
+
*/
|
|
215
|
+
elementQuerySelectors?: string[] | undefined;
|
|
115
216
|
}
|
|
116
217
|
|
|
117
218
|
/**
|