PDF plugin: replace PDF.js's top-level text extraction logic with a manual override, to help with spacing