What problem does it solve?
PDF workflows often require turning pages into images for vision models, extracting text, and compressing large documents for sharing. This skill streamlines these tasks with ready-to-run scripts that convert, resize, and compress PDFs.
Core Features & Use Cases
- Convert PDF pages to JPEG images for quick previews or ML analysis using convert-pdf-to-jpg.py.
- Downsize embedded images and optimize file size using downsize-pdf-images.py.
- Compress PDFs with a two-pass strategy (Ghostscript and QPDF) via compress-pdf.py to balance quality and size.
- Use cases include preparing invoices or reports for web publishing, archiving with OCR readiness, and generating thumbnails for dashboards.
Quick Start
- Install the required Python package dependencies and external tools as described in SETUP.md.
- Run: python convert-pdf-to-jpg.py <input.pdf> to generate images in .tools/_pdf_to_jpg_converted/
- Or run: python compress-pdf.py <input.pdf> --compression medium to produce a smaller optimized PDF in .tools/_pdf_output/