THotPDF.SetLoadedAnnotationContents Method
Replaces the selected loaded annotation's /Contents string and invalidates its page's render cache
This method preserves the existing appearance and rich text; changing /Contents alone does not rebuild visible FreeText text in /AP
Declaration
procedure SetLoadedAnnotationContents(PageIndex, AnnotationIndex: Integer; const AContents: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index or object index used to select an existing item |
AnnotationIndex | Zero-based index or object index used to select an existing item |
AContents | Human-readable text stored in the PDF object, action, annotation, or structure element |
Return value
This member does not return a value
Usage notes
- Use zero-based page and annotation indices in a loaded document; if the annotation is not found, this method returns without changing it
- Use
SetLoadedFreeTextPlainTextwhen explicitly converting a supported FreeText annotation to a new visible ASCII Helvetica appearance - Use
SetLoadedFreeTextRichTextfor the separate rich-text metadata workflow