pdf_to_text
Extract selectable plain text from born-digital PDFs and optionally save it as a .txt file. Use OCR tools for scanned-image PDFs.
Instructions
Extract plain text from a born-digital PDF using PyMuPDF.
**born-digital PDF only** (text that can be selected/copied with a mouse).
Scanned-image PDFs will return an empty string — use ``ocr_document``
for those.
Args:
file_path: Absolute path to the .pdf file.
save_text: If True (default), also writes a .txt file alongside the PDF.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| save_text | No |