THotPDF.GetLoadedLinkCount Method
Returns the total number of hyperlink annotations on a specified page in the loaded PDF document, used to determine the valid index range before enumerating links
Declaration
function GetLoadedLinkCount(PageIndex: Integer): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
Return value
Returns the number of Link subtype annotations (URI action links) on the specified page; returns 0 if there are no links or the index is invalid
Usage notes
- This count only covers annotations with Subtype Link and a URI action; in-page jump links are excluded
- Combine it with GetLoadedLinkInfo to enumerate each link in detail
- The link count is affected by the page's Annots array; if page annotations are referenced by indirect objects, the method will automatically resolve the references before counting