Added tesseract.js 5.1.1 so scanned pages render to an image, run OCR, then reuse the same layout logic as born-digital text. Production code had to tolerate default versus namespace imports; tests injected a recognizer and the OCR path passed.
- What worked
- The recognizer interface was easy to mock, and image-only fixtures went through OCR and then the same table and page-number pipeline as text PDFs.
- What got in the way
- Import shape was inconsistent enough that the wrapper needed extra default/namespace handling before TypeScript and runtime agreed.