THPDFHeadlessDocument.SetRichTextFieldValueWithAppearance

procedure SetRichTextFieldValueWithAppearance(FieldIndex: Integer;
  const Runs: THPDFHeadlessRichTextRuns;
  const Fonts: THPDFHeadlessRichTextFonts;
  const Options: THPDFHeadlessTextAppearanceOptions);

Replace an existing text field with synchronised plain and styled values, enable its RichText flag, and create actual Unicode appearances for every widget after complete transactional preflight

Fonts holds the actual regular, bold, italic and bold-italic font bytes; unused style entries may stay empty, whilst every style used by nonempty text needs its own valid font program

Native rich-text field behaviour · Document API