agentleFS
danielrosehilldanielrosehill/Claude-Image-Production-Plugin/skills/pdf-to-images/SKILL.md

pdf-to-images

Skill21 starsChanged 8 days agoMITView on GitHub

Rasterize PDF pages to numbered image files (JPEG, PNG, or TIFF) at a specified resolution (DPI). Use when you need to convert PDF content to standalone images — one image per page — with optional page range selection.

  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If invalid, abort. Print page count for user awareness.

    line 43
  2. Very specific:

    All pages, JPEG at 300 DPI: pdftoppm -r 300 -jpeg input.pdf output_

    line 55
  3. Very specific:

    All pages, TIFF at 600 DPI: pdftoppm -r 600 -tiff input.pdf output_

    line 57
  4. Distinctive:

    If a page range was used, note which pages were extracted.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rasterize PDF to Images

Convert PDF pages to raster images (JPEG, PNG, or TIFF) using pdftoppm. Each page becomes a numbered image file. Different from pdf-extract-embedded-images — this rasterizes the entire page content.

When to use

  • Converting a scanned PDF or document PDF to standalone images for archival, editing, or distribution.
  • Extracting pages as thumbnails or preview images at lower DPI.
  • Creating image sequences from a multi-page PDF without needing OCR or text extraction.

Inputs to gather

  • Input PDF file — path to the PDF. Required.
  • DPI (resolution) — dots per inch. Default: 300 (suitable for archival and print). Ask if the user needs lower DPI for faster processing or smaller file size (e.g., 150 for thumbnails, 600 for high-quality scans).
  • Output format — jpeg, png, or tiff. Default: jpeg (good balance of size and quality). PNG for lossless, TIFF for archival.
  • Page range (optional) — ask if they want all pages or a subset. If a subset, capture start page and end page (e.g., pages 5–10).
  • Output directory — optional. Default: current directory.

Procedure

1. Check tooling

command -v pdftoppm || echo "pdftoppm not installed — install with: sudo apt install poppler-utils"

Abort if missing.

2. Validate PDF

file "<input.pdf>"
pdfinfo "<input.pdf>"  # shows page count, dimensions, etc.

If invalid, abort. Print page count for user awareness.

3. Build command

Base command:

pdftoppm -r <DPI> -<format> "<input.pdf>" "<output-prefix>"

Examples:

  • All pages, JPEG at 300 DPI: pdftoppm -r 300 -jpeg input.pdf output_
  • Pages 5–10, PNG at 150 DPI: pdftoppm -r 150 -png -f 5 -l 10 input.pdf output_
  • All pages, TIFF at 600 DPI: pdftoppm -r 600 -tiff input.pdf output_

Flags:

  • -r <DPI> — resolution in DPI.
  • -<format> — output format: jpeg, png, tiff.
  • -f <N> — first page (optional).
  • -l <N> — last page (optional).

4. Execute

pdftoppm -r <DPI> -<format> <page-flags> "<input.pdf>" "<output-prefix>"

Show progress and warn if the PDF is large (many pages or high DPI — processing may take a minute or more).

5. Report

After conversion:

  • Count of images created.
  • Output directory and filename pattern (e.g., output_001.jpg, output_002.jpg, ...).
  • File sizes and total space used.
  • If a page range was used, note which pages were extracted.

Output / side effects

  • Numbered image files created (e.g., prefix-000001.png). Naming convention depends on pdftoppm version; typically zero-padded 6-digit page numbers.
  • Original PDF unchanged.

Notes

  • Rasterization vs. embedding: pdftoppm rasterizes the entire page at the specified DPI. This is lossy compared to the original PDF vector content, but suitable for archival, sharing, or thumbnail workflows. See pdf-extract-embedded-images for extracting embedded photos without rasterization.
  • DPI guidance: 300 DPI is standard for documents and photos. 150 DPI is adequate for thumbnails or web preview. 600 DPI or higher for fine scanning or print-quality archival.
  • Format choice: JPEG for smaller files (good for photos within PDFs). PNG for lossless (documents with text). TIFF for professional archival (larger files, lossless, can embed metadata).
  • Large PDFs: Page rasterization is I/O and CPU intensive. A 100-page PDF at 300 DPI can take 1–2 minutes. Warn the user before starting large jobs.
  • Depends: apt install poppler-utils.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.