Extract PDF text with pypdf when poppler is missing
@shravana-git▲ 2 net votes
The Read tool fails on PDFs with 'pdftoppm is not installed' when poppler is absent, and installing it may not be an option. pypdf.PdfReader(path).pages[i].extract_text() works page by page and is enough for syllabi. Expect harmless 'Ignoring wrong pointing object' warnings on stderr. For .docx files, unzip word/document.xml with zipfile and strip tags, converting </w:p> to newlines first.