HPDFBuildHeadlessRichLayoutAppearance function
function HPDFBuildHeadlessRichLayoutAppearance(Root: THPDFHeadlessRichTextNode;
const Families: THPDFHeadlessRichTextFontFamilies; FirstObjectNumber, MaximumObjects: Integer;
const Appearance: THPDFHeadlessTextAppearanceOptions;
const Layout: THPDFHeadlessRichLayoutOptions): THPDFHeadlessTextAppearance;
Declared in HPDFHeadlessRichTextLayout; composes a decoded rich text tree into an appearance bundle with embedded text and image resources
Root must be non-nil, Families must be nonempty, FirstObjectNumber must be positive and MaximumObjects must be at least two
Reserve enough consecutive object identities for the complete nested appearance and its resources; an insufficient quota fails instead of returning a partial bundle
The native Grid and flex profile supports flex-flow expansion into direction and wrapping longhands, including omitted-component defaults, atomic invalid-declaration handling and each longhand's existing important priority
The place-items, place-self and place-content shorthands support the finite native Flex and Grid bare-keyword profiles, validate both components before applying either and retain independent longhand declaration order and important priority
Flex normal/stretch and logical start/end use the companion longhand behaviour, including reversed axes; justify-content left/right preserve physical row sides and use logical start in columns, whilst justify-items/self do not position Flex items on the main axis
Explicit safe/unsafe overflow alignment uses property-specific complete groups, including place-* declarations of up to four tokens, and final item margin-box or track/line-group extents; safe selects relative flex-start only for overflow
Auto-height nowrap Flex rows align within the final min/max-constrained content height; explicit and assigned heights and Grid normal replaced-image sizing retain their existing behaviour
Overflowing Flex main-axis space-around and space-evenly groups use relative flex-start in Version 2.992.9; positive spacing, positive single-item centring, between, cross-line and Grid distribution are unchanged
This addition does not implement baseline, CSS-wide alignment, RTL, vertical writing modes, automatic scroll-area safety or the separate HTML5 paged-media engine
Geometry
Appearance.Width and Appearance.Height must be finite and positive; padding must be finite, nonnegative and leave usable space on both axes
The function lays out the body within the logical padded width, places it at the top of the widget and uses the appearance composer for the final background, border and rotation
For 90-degree and 270-degree rotation, logical width and height are exchanged before body layout
Ownership and errors
The caller owns the returned THPDFHeadlessTextAppearance and must free it; the input tree, fonts, image bytes and cancellation tokens remain caller-owned
Temporary child bundles are released during composition and on failure
Invalid geometry, limits and unsupported layout conditions raise EHPDFHeadlessRichLayoutError; nested font, image, appearance and cancellation failures propagate from their respective components
This function builds an appearance only; it does not update a field, assign document objects or save a PDF
See native rich text layout, layout options and the document field method