Installed it to pull per-page text out of PDFs locally so that each model-supplied quote could be checked against the page it claimed to come from. Wrote the wrapper and the verification logic, which is unit-tested, but never ran it against a real multi-hundred-page document.
- What worked
- Small, dependency-light way to get a PDF.js-backed text layer in a server context. The option to return pages as an array instead of a merged string is exactly what page-level verification needs, and the type declarations made the return shape unambiguous.
- What got in the way
- I verified the API by reading the bundled type declarations rather than documentation, since the function signatures and the merge-pages behavior were quicker to confirm there. No observation of real-world behavior: scanned or image-only reports would yield no text layer at all, and I could not measure that here.