# Install img2pdf with Homebrew, apt, MacPorts, Nix, pacman, zypper

Convert images to PDF via direct JPEG inclusion. Version 0.6.3 via Homebrew; verified 2026-04-22.

## Install

```sh
sudo av install brew:img2pdf
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install img2pdf
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install img2pdf
```

  Evidence: MacPorts ports tree: graphics/img2pdf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install img2pdf
```

  Evidence: Debian stable package indexes: img2pdf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#img2pdf
```

  Evidence: nixpkgs package indexes: img2pdf from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S img2pdf
```

  Evidence: Arch Linux sync databases: img2pdf from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install python311-img2pdf
```

  Evidence: openSUSE Tumbleweed package metadata: python311-img2pdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:img2pdf
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/img2pdf>
- **Version:** 0.6.3
- **Source summary:** Convert images to PDF via direct JPEG inclusion
- **Homepage:** <https://gitlab.mister-muffin.de/josch/img2pdf>
- **Repository:** <https://gitlab.mister-muffin.de/josch/img2pdf>
- **Upstream docs:** <https://gitlab.mister-muffin.de/josch/img2pdf>
- **License:** LGPL-3.0-or-later
- **Source archive:** <https://files.pythonhosted.org/packages/8e/97/ca44c467131b93fda82d2a2f21b738c8bcf63b5259e3b8250e928b8dd52a/img2pdf-0.6.3.tar.gz>
- **Last updated:** 2026-04-22T13:09:58Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- img2pdf (cli)
- img2pdf-gui (cli)
- img2pdf (alias)
- img2pdf-gui (alias)

## Dependencies

- pillow
- python@3.14
- qpdf

## Uses from macOS

- libxml2
- libxslt

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.6.3
- Package-manager updated: 2026-04-22
- Local data: ok
- Upstream repository: https://gitlab.mister-muffin.de/josch/img2pdf
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

img2pdf is a Python CLI and library for lossless conversion of raster images into PDF. Its central trick is treating PDF as a container for image data whenever possible, avoiding the re-encoding that makes many image-to-PDF workflows slower, larger, or lossy.

### Project history

The changelog records an initial 0.1.0 packaging entry in March 2014, followed by public PyPI uploads beginning in 2014. The project moved from GitHub to gitlab.mister-muffin.de in the 0.2.0 development line documented in 2015.

The README frames img2pdf around three priorities: always lossless, small output, and fast conversion. It directly contrasts that with conventional conversion tools such as ImageMagick, which may re-encode images, inflate output, or consume more CPU and memory.

Over time the project added Python 3 support, reproducible output options, multipage and palette image handling, CCITT Group 4 TIFF direct copying, PDF/A-1b output, pikepdf support, pathlib input, JBIG2 support, and a minimal tkinter GUI.

### Adoption history

img2pdf spread through both Python and operating-system package channels. Its README documents pip installation, source installation, Debian and Ubuntu repository installation, and Windows executables from the project's release page.

Homebrew formula metadata shows bottled distribution for the CLI on macOS and Linux. PyPI metadata supplies the Python-library distribution path, making img2pdf useful both in scripts and as a dependency inside larger document-processing programs.

### How it is used

At the command line, users pass one or more image files and write a PDF with -o, or stream a single image from standard input to standard output. The README includes a SANE scanimage pipeline that turns a scan directly into a PDF.

As a library, callers use img2pdf.convert with filenames, file handles, pathlib paths, globs, or in-memory image data. Options cover page layout, DPI, rotation handling, and PDF/A output.

### Why package nerds care

img2pdf is package-nerd significant because it solves a common automation problem with a precise format insight: for JPEG, JPEG2000, suitable PNG, CCITT Group 4 TIFF, and JBIG2 cases, the best conversion is often not conversion at all, but direct embedding.

That makes it a favorite kind of small package: easy to install, easy to shell-script, and technically sharper than larger generic image suites for its particular job.

### Timeline

- 2014: 0.1.0 records the initial PyPI packaging work; 0.1.1 changes the license from GPL to LGPL.
- 2015: 0.2.0 moves the project to gitlab.mister-muffin.de and adds a larger test suite and standard-input support.
- 2018: 0.3.1 directly copies CCITT Group 4 TIFF images into PDF containers.
- 2020: 0.4.0 adds PDF/A-1b support, pikepdf support, ICC profile handling, and a rewritten test suite.
- 2023: 0.5.0 changes thumbnail behavior and accepts pathlib.Path objects as input.
- 2025: 0.6.0 adds JBIG2 support; 0.6.3 adds pyproject.toml and merges the jp2 module.

### Related projects

- Pillow supplies image metadata and fallback conversion support.
- pikepdf is an optional PDF engine used in newer img2pdf releases.
- ImageMagick is the comparison point named by the README for conventional image-to-PDF conversion.
- SANE scanimage is shown in the README as part of a scanner-to-PDF pipeline.

### Sources

- <https://formulae.brew.sh/api/formula/img2pdf.json>
- <https://gitlab.mister-muffin.de/josch/img2pdf>
- <https://gitlab.mister-muffin.de/josch/img2pdf/raw/branch/main/CHANGES.rst>
- <https://gitlab.mister-muffin.de/josch/img2pdf/raw/branch/main/README.md>
- <https://pypi.org/pypi/img2pdf/json>


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** img2pdf
- **Version Scheme:** 0
- **Revision:** 1
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - img2pdf - 0.6.1-1: normalized package name match | Debian stable package indexes: img2pdf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Lossless conversion of raster images to PDF | https://gitlab.mister-muffin.de/josch/img2pdf
- Debian apt - python3-img2pdf - 0.6.1-1: normalized package name match | Debian stable package indexes: python3-img2pdf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Lossless conversion of raster images to PDF (library) | https://gitlab.mister-muffin.de/josch/img2pdf
- Nix - img2pdf: normalized package name match | nixpkgs package indexes: img2pdf from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - img2pdf - 0.5.1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: img2pdf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Lossless conversion of raster images to PDF | https://gitlab.mister-muffin.de/josch/img2pdf
- Ubuntu apt - python3-img2pdf - 0.5.1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-img2pdf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Lossless conversion of raster images to PDF (library) | https://gitlab.mister-muffin.de/josch/img2pdf
- pacman - img2pdf - 0.6.3-1: normalized package name match | Arch Linux sync databases: img2pdf from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Losslessly convert raster images to PDF | https://gitlab.mister-muffin.de/josch/img2pdf
- zypper - python311-img2pdf - 0.6.3-2.1: normalized package name match | openSUSE Tumbleweed package metadata: python311-img2pdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python module for converting images to PDF via direct JPEG inclusion | https://gitlab.mister-muffin.de/josch/img2pdf
- zypper - python313-img2pdf - 0.6.3-2.1: normalized package name match | openSUSE Tumbleweed package metadata: python313-img2pdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python module for converting images to PDF via direct JPEG inclusion | https://gitlab.mister-muffin.de/josch/img2pdf
- zypper - python314-img2pdf - 0.6.3-2.1: normalized package name match | openSUSE Tumbleweed package metadata: python314-img2pdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python module for converting images to PDF via direct JPEG inclusion | https://gitlab.mister-muffin.de/josch/img2pdf
- MacPorts - img2pdf: normalized package name match | MacPorts ports tree: graphics/img2pdf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://www.automicvault.com/pkg/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [qpdf](https://www.automicvault.com/pkg/brew/qpdf/) - Runtime dependency declared by Homebrew.
- [ocrmypdf](https://www.automicvault.com/pkg/brew/ocrmypdf/) - Popular package that depends on this formula.
- [md2pdf](https://www.automicvault.com/pkg/brew/md2pdf/) - Shares av.db curated category or tags: cli, documents, media, pdf.
- [podofo](https://www.automicvault.com/pkg/brew/podofo/) - Shares av.db curated category or tags: cli, media, pdf.
- [poppler](https://www.automicvault.com/pkg/brew/poppler/) - Shares av.db curated category or tags: cli, media, pdf.
- [verapdf](https://www.automicvault.com/pkg/brew/verapdf/) - Shares av.db curated category or tags: cli, media, pdf.
- [dspdfviewer](https://www.automicvault.com/pkg/brew/dspdfviewer/) - Shares av.db curated category or tags: cli, media, pdf.
- [jp2a](https://www.automicvault.com/pkg/brew/jp2a/) - Shares av.db curated category or tags: cli, image-conversion, jpeg, media.
- [pdf2image](https://www.automicvault.com/pkg/brew/pdf2image/) - Shares av.db curated category or tags: cli, image-conversion, media, pdf.

## Combined YAML source

View the package source record on GitHub. [combined/img2pdf.yml](https://github.com/automic-vault/db/blob/main/combined/img2pdf.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
