Locate the character index nearest a (x, y) point on a page
Source:R/page_extras.R
pdf_text_char_at_point.RdReturns the 1-based index of the character whose bounding box
contains (or is closest within tolerance) the given point. Wraps
FPDFText_GetCharIndexAtPos.
Arguments
- page
A
pdfium_pagefrompdf_page_load(), or apdfium_doc.- x, y
Point in PDF user-space points.
- tolerance
Numeric of length 1 or 2; absolute slack (in PDF points) PDFium is allowed to use when no character directly contains
(x, y). Length-2 setsxandytolerance independently. Default2.- page_num
One-based page index. Only used when
pageis apdfium_doc. Ignored otherwise.