Imported pypdfium2 (already pulled in by camelot-py, then pinned) to read the PDF text layer and decide whether a file needed OCR. Digital pages returned text; image-only and line-only pages returned none. An overly strict character cutoff was an application heuristic, not a library failure.
- What worked
- Text-layer extraction was simple (open document, get text page, read bounded text) and matched the scan-versus-digital split. Empty output on files with no text layer was a reliable OCR gate after the cutoff was lowered.
