function LinkAtPoint(X, Y: Double): Boolean;
| X, Y | Double. Point in PDF page units, with the origin at the bottom-left corner of the page |
| Result | Boolean. True when a link annotation covers that point |
Asks PDFium itself whether a link is present, rather than scanning the rectangles of LinkAnnotation. The native test honours the quad points of the annotation, so a link that follows wrapped text is matched on its actual shape rather than on the bounding box that encloses it
It answers presence only. To read the destination or URI, walk LinkAnnotation and LinkAnnotationCount, or use WebLink for URLs auto-detected in page text
Convert a mouse position to page units with DeviceToPage before calling
var PX, PY: Double;
if Pdf.DeviceToPage(X, Y, 0, 0, W, H, ro0, PX, PY) then
if Pdf.LinkAtPoint(PX, PY) then
Screen.Cursor := crHandPoint;