THPDFHeadlessRichTextDecodeOptions
THPDFHeadlessRichTextDecodeOptions = record
MaxCodeUnits, MaxTotalCodeUnits, MaxNodes, MaxDepth, MaxRuns: Integer;
CancellationToken: THPDFCancellationToken;
DefaultStyle: THPDFHeadlessRichTextRun;
FontFamilyNames: THPDFHeadlessRichTextFontFamilyNames;
PreserveFontFamilyLists: Boolean;
class function Default: THPDFHeadlessRichTextDecodeOptions; static;
end;
MaxCodeUnits bounds the input XHTML and every decoded text or attribute; MaxTotalCodeUnits bounds aggregate decoded text and attribute storage
MaxNodes bounds elements, attributes and ordered text pieces; MaxDepth bounds XML nesting and must not exceed 64; MaxRuns bounds returned runs and may not exceed 4096
All limits must be positive; the optional caller token is checked before parsing, during text scans, throughout XML and run traversal, and repeatedly whilst scanning inline CSS comments and declaration boundaries
DefaultStyle supplies the inherited font size, colour, font style, decoration and alignment for the body; its Text and ParagraphBreakBefore values do not add content
FontFamilyNames optionally enables bounded named-family selection; configure between one and sixteen distinct nonempty labels matching the supplied families, and set DefaultStyle.FontFamily to the chosen default label
PreserveFontFamilyLists defaults to False; when True with configured FontFamilyNames, valid font-family declarations retain their ordered labels in each run's FontFamilyCandidates, including unknown labels, whilst FontFamily still selects the first configured match or the configured default
Inherited and important declarations keep the same ordered list; lists have at most sixteen valid labels, and a nonempty DefaultStyle.FontFamilyCandidates requires this option
Font shorthand uses these same names and candidate-list options; its size and style components stay available without named-family configuration
The default empty names array retains the existing single-family decoder profile and ignores font-family declarations
MediaType, MediaFeatures and MediaInitialFontSize select the explicit print/screen profile and initial font used for internal style media attributes and nested @media conditions
DocumentURI, StyleSheetTitle and StyleSheets configure caller-supplied external style sheets; their defaults are empty and do not retrieve resources
Numeric math uses DefaultStyle.FontSize for initial root sizing, the computed root font for rem lengths, and explicit MediaFeatures width and height for viewport units; math scanning and recursion retain the node, depth and cancellation bounds
Native support queries admit @supports groups and supports() imports using the supported declaration and selector profile, with shared bounds and cancellation recovery