Hit-test for a link annotation, returning its annotation index
Source:R/annot_probes.R
pdf_link_annot_at_point.RdCompanion to pdf_link_at_point() (which surfaces the link's
action / destination / URI) — this one returns the
page-scoped annotation index of the underlying link annotation
so the caller can hand it to pdf_annot_dict_value() /
pdf_annot_appearance() / pdf_annotations() for the full
structural readout. Wraps FPDFLink_GetLinkAtPoint +
FPDFLink_GetAnnot.
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 list with three fields:
found(logical) —TRUEwhen a link is under the point.annotation_index(integer) — 1-based same-page annotation index of the underlying link annotation;NAwhen no link is found.z_order(integer) — the link's Z-order on the page;NAwhen no link is found.