Finds the link annotation at PDF user-space coordinates (x, y)
on a page. Useful for translating a click on a rendered PDF back
to its semantic target. Wraps FPDFLink_GetLinkAtPoint plus the
FPDFLink_GetLinkZOrderAtPoint / FPDFLink_GetAction /
FPDFAction_* family.
Arguments
- page
A
pdfium_pagefrompdf_page_load(), or apdfium_doc(the page given bypage_numwill be loaded and closed internally).- x, y
Point coordinates in PDF user-space points.
- page_num
One-based page index. Only used when
pageis apdfium_doc. Ignored otherwise.
Value
A tibble with at most one row. Columns:
z_order— integer, the link's Z-order on the page (higher = on top).left,bottom,right,top— link's rectangle in PDF points.action_type— character:"goto","remote_goto","uri","launch","embedded_goto", or"unsupported".uri— the link target URI whenaction_type == "uri",NAotherwise.filepath— the external file path whenaction_typeis"remote_goto"/"launch"/"embedded_goto",NAotherwise.dest_page— the resolved 1-based target page for any GoTo action (NAif not resolvable).
Empty tibble (0 rows) when no link sits under the point.
Details
Coordinates are in PDF user-space points (origin at the page's
bottom-left; page width and height in points come from
pdf_page_size()).
See also
pdf_page_links() for the full enumeration.