THotPDF.GetLoadedLinkInfo Method
Reads the clickable area rectangle and target URI string of a specific hyperlink annotation on a specified page of the loaded PDF, used for extracting or verifying external links in the document
Declaration
function GetLoadedLinkInfo(PageIndex, LinkIndex: Integer; out ARect: THPDFRect; out AURI: AnsiString): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
LinkIndex | Zero-based index of the link in the page's link list; the valid range is given by GetLoadedLinkCount |
AURI | Output parameter, receives the URI string of the link destination |
ARect | Receives the link /Rect normalised in PDF user space, with Left <= Right and Bottom <= Top |
Return value
Returns True when the link information is read successfully
Usage notes
- Call GetLoadedLinkCount first to obtain the valid index range
- The returned URI may contain special characters or non-ASCII bytes; URL decoding or character set conversion is recommended before display
- This method only extracts URI action links; if you need to get in-page jump link information, you should independently parse it via the action object of the annotation dictionary