THotPDF.GetLoadedAnnotationURI Method
Extracts and returns the external URI bound to a specific annotation (usually a link annotation) on the specified page in the loaded document.
Declaration
function GetLoadedAnnotationURI(PageIndex, AnnotationIndex: Integer): AnsiString;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Specifies the page index where the query occurs (zero-based). |
AnnotationIndex | Specifies the item index in the annotation list of the target page (zero-based). |
Return value
Returns the URI string associated with this annotation; returns an empty string if the annotation at the selected index is not a URI type or does not exist.
Usage notes
- This method lets you analyse and extract each annotation target on a single page in fine detail
- Before iterating, obtain the page's annotation count first via the corresponding count method
- Loaded-document object references may be indirect; resolve arrays, dictionaries or streams before inspecting nested values