THotPDF.AddLoadedFreeTextAnnotation Method
Adds a free text annotation to the specified page of the loaded PDF; the annotation content is directly visible within the page's rectangular area and does not require clicking to expand
Declaration
procedure AddLoadedFreeTextAnnotation(PageIndex: Integer; ARect: THPDFRect; const AContents: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
ARect | The rectangular area of the annotation text box on the page (PDF user coordinates) |
AContents | The text content displayed directly within the annotation area |
X2 | Input supplied to AddLoadedFreeTextAnnotation |
Y2 | Input supplied to AddLoadedFreeTextAnnotation |
AText | Input supplied to AddLoadedFreeTextAnnotation |
Return value
This member returns no value
Usage notes
- Unlike the text annotation icon (Text), a FreeText annotation is rendered directly on the page and can be read without any interaction
- If the annotation rectangle overlaps with page content, it will obscure the original content; when laying out, blank areas or margins on the page should be chosen
- The font and size of the annotation are determined by the PDF viewer's default style; for precise visual control, an extended interface with style parameters should be used