THPDFHeadlessRichLayoutOptions record
THPDFHeadlessRichLayoutOptions = record
MaxOperations, MaxCells, MaxColumns, MaxImages: Integer;
MaxResourceBytes, MaxDecodedBytes: Integer;
Images: THPDFHeadlessRichImageResources;
CancellationToken: THPDFCancellationToken;
class function Default: THPDFHeadlessRichLayoutOptions; static;
end;
Declared in HPDFHeadlessRichTextLayout; initialize the record with Default before overriding individual limits
| Member | Default | Purpose |
|---|---|---|
MaxOperations | 100000 | Maximum metered layout steps |
MaxCells | 16384 | Maximum table cells and bounded row collection |
MaxColumns | 1024 | Maximum table or grid columns and wrapped flex column lines; values above 1024 are rejected |
MaxImages | 256 | Bounds supplied resource count and image use |
MaxResourceBytes | 16777216 | Encoded-resource byte budget |
MaxDecodedBytes | 67108864 | Decoded image byte budget |
Images | Empty | Explicit URI, content type and byte records |
CancellationToken | nil | Caller-owned cooperative cancellation token |
Every numeric limit must be positive; the image resource count must not exceed MaxImages
Grid repeat() expansion is bounded by MaxColumns; flex/grid child collection is bounded by MaxCells, while track parsing, sizing and intrinsic-width planning share MaxOperations, cancellation and borrowed workspace admission
Grid row expansion and its occupancy matrix share MaxCells; spans, sparse or dense placement, row contribution measurement and final placement debit the same operation and admitted workspace ledgers, including temporary measurement bundles
Stable flex ordering, column line collection and measurement, per-line sizing and any stretch rebuild debit the same operation, cell and workspace ledgers; recursive intrinsic measurement also retains a 64-level bound and an aggregate 4096-run bound
Document entry points also apply the loaded document's limits and require one shared token across all active option records
Layout := THPDFHeadlessRichLayoutOptions.Default;
Layout.MaxImages := 32;
Layout.MaxResourceBytes := 4 * 1024 * 1024;
See native rich text layout and HPDFBuildHeadlessRichLayoutAppearance
Flex line collection, cross-size measurement, content alignment, reversed placement and any stretch rebuild share these existing limits and the same workspace and cancellation account; no additional public option or per-pass budget reset is introduced
Grid content distribution, eligible automatic-row stretch, spanned item alignment, intrinsic measurement and overflow composition share the existing operation, object, workspace and cancellation limits
Named-line resolution, directional named spans and both automatic-placement axes debit the existing cancellation and operation ledger; MaxColumns limits all physical columns including prepended and column-flow tracks, and MaxCells bounds complete occupied extents