THotPDF.AddLoadedTextAnnotation Method
Adds a text annotation (sticky note) with author information to the specified page of the loaded PDF
Declaration
procedure AddLoadedTextAnnotation(PageIndex: Integer; ARect: THPDFRect; const AContents: AnsiString; const AAuthor: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
ARect | The placement rectangle area of the annotation icon on the page (PDF user coordinates) |
AContents | The text content of the annotation, displayed to the user when the sticky note is expanded |
AAuthor | The author name of the annotation, written to the T entry of the PDF annotation |
Y2 | Input supplied to AddLoadedTextAnnotation |
AContents | Human-readable text stored in the PDF object, action, annotation, or structure element |
AAuthor | Input supplied to AddLoadedTextAnnotation |
Return value
This member returns no value
Usage notes
- A text annotation appears on the page as a small icon and shows no content text directly; the user must click the icon to expand it
- The coordinate origin is the bottom-left corner of the page with the y axis pointing upwards; make sure the placement rectangle stays within the page bounds
- After adding an annotation, the save method must be called to write it to the output file, otherwise the annotation will only exist in memory