Locate a piece of text in the PDF and return its precise position — the rects
of the exact phrase (sub-item, per-line), not a whole sentence. Use it to turn
an external quote / citation into a highlight you can render or scroll to.
Robust to PDF quirks: matching ignores whitespace (so line-wraps and spacing
differences don't matter) and falls back to bounded fuzzy matching for minor
differences (hyphenation, OCR, slight paraphrase). Returns the first match
(optionally restrict the page range), or null.
Locate a piece of text in the PDF and return its precise position — the rects of the exact phrase (sub-item, per-line), not a whole sentence. Use it to turn an external quote / citation into a highlight you can render or scroll to.
Robust to PDF quirks: matching ignores whitespace (so line-wraps and spacing differences don't matter) and falls back to bounded fuzzy matching for minor differences (hyphenation, OCR, slight paraphrase). Returns the first match (optionally restrict the page range), or null.