images-to-pdf

Convert a directory of images into a single paged PDF using FPDF and Pillow.

1|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/brianlan/improved-ai-agent --skill images-to-pdf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: images-to-pdf
Source: https://github.com/brianlan/improved-ai-agent/tree/main/skills/images-to-pdf
Command: npx skills add https://github.com/brianlan/improved-ai-agent --skill images-to-pdf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fpdf, Pillow, and includes scripts (resource) components.

What problem does it solve?

Convert a directory of images into a single PDF document, preserving the visual order and making it easy to share or archive image collections.

Core Features & Use Cases

  • Batch converts image directories to PDFs with pages scaled to fill the page.
  • Supports PNG, JPG/JPEG, GIF, BMP, TIFF, and WebP image formats and sorts by filename to preserve order.
  • Creates the output directory if missing and supports both A4 and Letter paper sizes.

Quick Start

Provide an input directory of images and an output PDF path to generate a single, full-page PDF.

Frequently Asked Questions about images-to-pdf

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

FAQPage Schema
How do I convert a directory of images into a single PDF?

To convert a directory of images into a single PDF, provide an input folder and an output path. The script scales images to fill pages and sorts files by filename to preserve visual order for sharing or archiving.

What image formats can I batch convert to PDF?

Supported image formats for batch conversion to PDF include PNG, JPG/JPEG, GIF, BMP, TIFF, and WebP. The script processes these formats while sorting them by filename to maintain the correct sequence.

Do I need Python and specific libraries to convert images to a PDF?

Yes, you need Python installed along with the FPDF and Pillow dependencies. These libraries handle the image processing and PDF generation required to scale images and output the final document.

Can I generate A4 and Letter size PDFs from images?

Yes, you can generate both A4 and Letter size PDFs from images. The script creates the output directory if missing and scales your batch of images to fit your chosen paper size for reports or ebooks.

How does the tool sort images when consolidating them into a PDF?

When consolidating images into a PDF, the tool sorts files by filename. This preserves the visual order of your image collection, ensuring the pages appear in the correct sequence within the final document.