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
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