I’m trying to pull text from a batch of PDF reports using Python, but some are scanned and others have selectable text. What’s the best way to handle both types?
Honestly, the simplest way is trying pdfplumber first to see if it grabs anything. If a page returns empty, just fall back to pytesseract for OCR on that one. Saves a ton of proccessing time instead of running OCR on everything.