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
返回注释字典的 THPDFDictionaryObject;若索引越界或注释对象无效,则返回 nil
Usage notes
- 调用前应先通过
GetLoadedAnnotationCount确认有效索引范围,索引越界将返回nil - 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