# Anyone know how to extract text from pdf with python?

**URL:** <https://www.insumo.io/t/anyone-know-how-to-extract-text-from-pdf-with-python/191>\
**Category:** Forms & Data Capture\
**Created:** [November 18, 2026, 10:25pm UTC](https://www.insumo.io/t/anyone-know-how-to-extract-text-from-pdf-with-python/191 "2026-11-18T22:25:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![storm\_ice](https://www.insumo.io/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@storm\_ice](https://www.insumo.io/u/storm_ice)\
**Post date:** [November 18, 2026, 10:25pm UTC](https://www.insumo.io/t/anyone-know-how-to-extract-text-from-pdf-with-python/191/1 "2026-11-18T22:25:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![clumsy\_goblin](https://www.insumo.io/letter_avatar_proxy/v4/letter/c/5fc32e/32.png) [@clumsy\_goblin](https://www.insumo.io/u/clumsy_goblin)\
**Post date:** [November 18, 2026, 10:25pm UTC](https://www.insumo.io/t/anyone-know-how-to-extract-text-from-pdf-with-python/191/2 "2026-11-18T22:25:21Z")

</div>

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.
