pdf-tools

Convert, downsize, and compress PDFs using Ghostscript, Poppler, and QPDF.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/karstenheld3/SharePoint-GPT-Middleware --skill pdf-tools-karstenheld3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-tools
Source: https://github.com/karstenheld3/SharePoint-GPT-Middleware/tree/main/.windsurf/skills/pdf-tools
Command: npx skills add https://github.com/karstenheld3/SharePoint-GPT-Middleware --skill pdf-tools-karstenheld3

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pdf2image, Pillow.

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/

Frequently Asked Questions about pdf-tools

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert PDF pages to images for vision models or web previews?

Convert PDF pages to JPEG images using convert-pdf-to-jpg.py, which outputs previews in .tools/_pdf_to_jpg_converted/. This prepares PDFs for machine learning analysis, dashboard thumbnails, or quick document inspection without rendering the full PDF.

What's the best way to compress large PDFs while maintaining quality?

Compress PDFs using a two-pass strategy with Ghostscript and QPDF via compress-pdf.py with configurable compression levels. This balances file size reduction for sharing and archiving while preserving document usability and OCR readiness.

Can I downsize embedded images in PDFs to reduce file size?

Downsize and optimize embedded images within PDFs using downsize-pdf-images.py, which reduces overall file size. This prepares documents for web publishing, email distribution, or storage without quality loss for typical use cases.

Do I need external tools installed to use PDF conversion and compression?

Yes, PDF tooling requires external dependencies—Ghostscript, Poppler, and QPDF—plus Python packages pdf2image and Pillow. Setup instructions in SETUP.md specify installation for your environment before running conversion or compression scripts.

What workflows can I automate with PDF-to-image conversion and compression?

Automate invoice and report preparation for web publishing, archive management with OCR readiness, and thumbnail generation for document dashboards. These workflows eliminate manual PDF processing and integrate into batch automation pipelines.