$npx skillfedfor your agent

img2pdf

Lossless conversion of raster images to PDF.

Worth itPyPI GraphicsReleased Nov 20252.3M downloads / mocopyleft licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — img2pdf-0.6.3-py3-none-any.whl
v0.6.3 · released 2025-11-05 · Python >=3.5 · 2 runtime deps: Pillow, pikepdf

Yes. The package fills a specific, well-defined niche: lossless image-to-PDF conversion with minimal file size and fast processing. Low install friction, no security vulnerabilities, and broad format support make it a solid choice for image-to-PDF workflows. The copyleft license is a minor consideration only if you plan to redistribute derivative code. Aging maintenance status (282 days since last release) is not a blocker for a stable, mature tool, but monitor for any future issues.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Input images must be provided as files or file handles; img2pdf needs to seek in the file descriptor and cannot work from pure in-memory byte streams alone.
  • Low friction install with two stable runtime dependencies (Pillow and pikepdf).
  • Package shows aging maintenance status with last release 282 days ago, but has been actively maintained since 2014 and supports current Python versions.

License · maintenance · safety

copyleft license (copyleft) — Licensed under LGPLv3 (copyleft). You may use and modify the package freely, but any derivative works must also be licensed under LGPLv3 and source code must be made available.

last release 2025-11-05 (282 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,325,033 downloads/mo, #3,139 on PyPI

Verify before relying

pip install img2pdf

import img2pdf

with open("output.pdf", "wb") as f:
    f.write(img2pdf.convert('input.jpg'))
  • Whether pikepdf is always required or only for certain image formats or operations
  • Performance characteristics on very large images relative to other tools
  • Compatibility with all PDF readers for directly-embedded formats beyond Adobe Acrobat Reader
Same gist for agents: .md · .json

What it is and what it does

img2pdf is a Python library and command-line tool that converts raster images into PDF files while preserving image quality and minimizing file size. Unlike general-purpose image converters, it avoids re-encoding pixel data whenever possible—for JPEG, JPEG2000, PNG, TIFF, and JBIG2 formats, the image data is embedded directly into the PDF container with only minimal PDF overhead added. For other formats or color spaces, it applies appropriate compression filters (PNG Paeth, CCITT Group 4, or flate) before embedding.

The package works both as a standalone command-line tool and as a Python library. It handles single images, multiple images, and batch operations from directories or glob patterns. It depends on Pillow for image metadata extraction and format conversion when needed, and pikepdf for PDF handling. The tool is designed to handle large images efficiently by avoiding full decompression into memory during the conversion process.

Use it for

  • Batch convert a folder of photographs to PDF without quality loss or file bloat for archival or sharing.
  • Create a multi-page PDF from a sequence of scanned document images while preserving original resolution.
  • Embed images directly into PDF containers from a Python script with minimal overhead and maximum speed.
  • Process JPEG or PNG images to PDF in a pipeline (e.g., from a scanner or camera) without intermediate re-encoding.
  • Handle CMYK or monochrome images that require specific PDF encoding while keeping file sizes small.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package fills a specific, well-defined niche: lossless image-to-PDF conversion with minimal file size and fast processing. Low install friction, no security vulnerabilities, and broad format support make it a solid choice for image-to-PDF workflows. The copyleft license is a minor consideration only if you plan to redistribute derivative code. Aging maintenance status (282 days since last release) is not a blocker for a stable, mature tool, but monitor for any future issues.

Install

img2pdf on PyPI

Before you install

Low friction install with two stable runtime dependencies (Pillow and pikepdf). Package shows aging maintenance status with last release 282 days ago, but has been actively maintained since 2014 and supports current Python versions.

Input images must be provided as files or file handles; img2pdf needs to seek in the file descriptor and cannot work from pure in-memory byte streams alone.

License in practice

Licensed under LGPLv3 (copyleft). You may use and modify the package freely, but any derivative works must also be licensed under LGPLv3 and source code must be made available.

Quickstart

pip install img2pdf

import img2pdf

with open("output.pdf", "wb") as f:
    f.write(img2pdf.convert('input.jpg'))

Verify before relying

  • Whether pikepdf is always required or only for certain image formats or operations
  • Performance characteristics on very large images relative to other tools
  • Compatibility with all PDF readers for directly-embedded formats beyond Adobe Acrobat Reader

Package facts

Licensecopyleft license copyleft
Python supportSupports the current Python release >=3.5
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
Pillowpikepdf
MaintenanceAging 282 days since the last release
First released
Downloads2,325,033 / month, #3,139 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)

Evidence: img2pdf-0.6.3-py3-none-any.whl

Tags

Capabilities
image to pdf conversionlossless image pdfbatch convert images pdfraster to pdffast image pdf without reencodingcommand line image pdf toolpython image pdf library
Topics
image-conversionpdf-generationcli-tool

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “image to pdf conversion”

  • img2pdfConverts raster images to PDF without re-encoding pixel data,…
  • pdf2imageConverts PDF files to PIL Image objects by wrapping the pdftoppm and…
  • convertapiA Python client for the ConvertAPI online file conversion service,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Graphics packages

pillow Worth it
PyPI · Graphics · released Jul 2026

Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.

Install it if you need to work with images in Python—it is the de facto standard for this task.

MIT-CMUcompiled wheel · 3.10+
547.1Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.

Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
matplotlib-inline Worth it
PyPI · Graphics · released May 2026

Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.

BSD-3-Clausepure Python · 3.9+
130.5Mdownloads / mo
pymupdf Worth it
PyPI · Libraries · released Aug 2026

PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.

The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.

AGPLcompiled wheel · 3.10+
114.9Mdownloads / mo
pypdfium2 Worth it
PyPI · Libraries · released Aug 2026

pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.

Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.

permissive licensecompiled wheel · 3.6+
76.9Mdownloads / mo
altair Worth it
PyPI · Graphics · released Jun 2026

Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.

BSD-3-Clausepure Python · 3.10+
54.5Mdownloads / mo

See also fpdf · rawpy · pdf2image · pyjpegls · vtracer · pylibjpeg-openjpeg · pylibjpeg · PyTurboJPEG · empty-files · pyvips