XFA Rich Text Property Overrides
Native flattening of exData draws resolves font and paragraph attributes for the current dataset occurrence, including overrides created by general JavaScript or FormCalc events
const label = xfa.resolveNode("main.row[1].label");
label.font.typeface = "Helvetica";
label.font.size = "18pt";
label.font.weight = "bold";
label.font.posture = "italic";
label.font.underline = "1";
label.font.fill.color.value = "0,128,255";
label.para.hAlign = "right";
label.para.spaceAbove = "3pt";
label.para.lineHeight = "30pt";
const span = label.value.exData.body.p.span;
span.setAttribute("color:#FFFF00", "style");
span.value = "Updated text";
Font and paragraph resolution
Typeface, size, weight, posture, underline and font-fill color initialize the rich text run style from effective instance attributes and supported schema defaults
The text measurement callback receives the effective typeface, size, bold and italic flags, so measurement and emitted run styles use the same instance values
The Windows PDF producer resolves logical Courier, Helvetica and Times families to Courier New, Arial and Times New Roman consistently during measurement and draw output, preserving the intended family when Windows does not expose the logical name as an installed face
Paragraph hAlign, marginLeft, marginRight, textIndent, spaceAbove, spaceBelow and lineHeight affect run placement; lineHeight cannot reduce the line step below the height required by its text
Recognized inline CSS overrides inherited font or paragraph values; a declaration that changes only one paragraph margin preserves the other inherited margin
Inline runs share a common text baseline across different font sizes, and adjacent paragraph spacing uses the maximum of the preceding spaceBelow and following spaceAbove; see Rich Text Paragraph Geometry
Inline content and persistence
Effective style and href attributes on declared XHTML property nodes participate in rich text processing, and effective scalar text overrides replace the corresponding leaf content
Creating an attribute override retains that node's template scalar content rather than erasing its text; an explicit empty scalar value omits the leaf run while preserving surrounding content
Legacy attribute-only form nodes continue to inherit template text; an explicit empty CDATA content node preserves the distinction between a scalar clear and an omitted body after serialization
Overrides persist in the native form packet, remain independent across repeated occurrences and survive XDP save and reload; failed events restore the exact prior native document
Coverage
This behavior applies to the rich text wrapping pipeline and its recognized CSS declarations; additional CSS properties, full widget rich text editing and implicit creation of absent property nodes continue as separate targets
Font underline activation uses the current run renderer; complete double-line and additional text-decoration geometry remain separate rendering targets
Related APIs
Native XFA Property DOM, Schema Defaults, HPDFXFAResolveFormInstanceProperty and ApplyXFAAsAcroForm