pdf-extract
Extract text and embedded images from PDF files using PyMuPDF (fitz).
SKILL.md0b916b42-6dad-4f25-8627-63c0e496a6b3/data/environment/skills/pdf-extract/SKILL.md
GitHubPDF Extract (PyMuPDF)
Pull plain text and/or embedded images out of a PDF for downstream reasoning.
Quick start
Extract all text to stdout:
python3 {baseDir}/scripts/extract.py /path/to/doc.pdf
Text to a file, images to a folder, a page range:
python3 {baseDir}/scripts/extract.py /path/to/doc.pdf \
--out /tmp_workspace/results/doc.txt \
--images-dir /tmp_workspace/results/imgs \
--pages 1-5
Outputs the page count and per-page text. Requires pymupdf (already in requirements.txt).