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
- 此计数仅统计 Subtype 为 Link 且动作类型为 URI 的注释;页内跳转链接不在统计范围内
- 结合
GetLoadedLinkInfo使用可安全遍历所有链接矩形和 URI 字符串 - 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