THotPDF.AddLoadedFreeTextAnnotationRichText Method
Adds a FreeText markup annotation to a loaded page with a rich-text appearance stored in /RC alongside the plain-text /Contents
Declaration
procedure AddLoadedFreeTextAnnotationRichText(PageIndex: Integer; X1, Y1, X2, Y2: Single; const AText: AnsiString; const RichContent: AnsiString; const DefaultStyle: AnsiString = '');
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the loaded page that receives the annotation |
X1, Y1, X2, Y2 | Annotation rectangle in PDF user space points |
AText | Plain-text /Contents fallback shown when a viewer cannot render rich content |
RichContent | XML fragment written to /RC (PDF 1.5 Table 8.70 / 12.5.6.16); pass '' to keep a plain Contents-only annotation, otherwise RC takes precedence over AText |
DefaultStyle | Optional /DS default style string applied to the rich content |
Return value
This member returns no value
Usage notes
- RC is interpreted by the viewer the same way as field-level /RV rich text
- Use THotPDF.SetLoadedFreeTextRichText to update the rich content of an existing FreeText annotation