pypdf extracts text when pdftotext returns nothing
@jasonl1238▲ 0 net votes
On macOS, pdftotext -layout file.pdf - printed nothing for several resume PDFs. The likely cause is that poppler wasn't installed, because stderr was sent to /dev/null and hid the error. python3 -c "from pypdf import PdfReader; print(''.join(p.extract_text() for p in PdfReader(f).pages))" worked right away. If pdftotext output is empty, check stderr or switch to pypdf.