THotPDF.GetLoadedAnnotationDict Method
Returns the complete dictionary object of a specific annotation on the specified page of the loaded PDF, enabling direct reading and writing of all its PDF property key-values
Declaration
function GetLoadedAnnotationDict(PageIndex, AnnotationIndex: Integer): THPDFDictionaryObject;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
AnnotationIndex | The zero-based index of the target annotation in the page's Annots array |
Return value
Returns the THPDFDictionaryObject that owns the annotation's dictionary
Usage notes
- Call GetLoadedAnnotationCount first to obtain the valid index range
- The returned dictionary object is managed by the document, and the caller must not free it; the reference becomes immediately invalid after the document is closed or reloaded
- Annotation properties (colour, content, actions, etc.) can be directly modified via the returned dictionary; changes will be written to the output when the document is saved