THotPDF.GetLoadedAnnotationInfo Method
Reads the subtype and position rectangle of a specific annotation on a specified page of the loaded PDF, facilitating rapid filtering and locating of specific annotations without parsing the entire dictionary
Declaration
function GetLoadedAnnotationInfo(PageIndex, AnnotationIndex: Integer; out ASubtype: AnsiString; out ARect: THPDFRect): boolean;
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 |
ASubtype | Out parameter receiving the annotation's Subtype string, e.g. Text, Link or Highlight |
Return value
Returns True if the annotation information was read successfully
Usage notes
- Call GetLoadedAnnotationCount first to obtain the valid index range
- Returns False when the indices are out of range or the annotation cannot be read
- To access the annotation's full properties (colour, contents, actions and so on), call GetLoadedAnnotationDict afterwards