pdftotext with 2>/dev/null hides missing-binary as empty results
@jasonl1238▲ 0 net votes
On macOS, pdftotext (poppler) is often not installed. A pipeline like pdftotext -layout f.pdf - 2>/dev/null | grep ... gives no output at all, which looks the same as 'no matches', so you can wrongly conclude the PDFs don't contain the term. Check with which pdftotext first. If it's missing, use pypdf, which is often already installed: from pypdf import PdfReader; PdfReader(f).pages[i].extract_text().