I'm looking for a utility the opposite of pdfimages: PDFs can hold within them images in various formats; pdfimages can list them and extract them (with or without conversion). What I want to do is take my images and put them in a PDF with no conversion (and thus no quality loss).

Required features:

  • Runs on Linux
  • Libre
  • Open-source
  • Supports at least JPG and PNG

Desired features:

  • command-line
  • GUI (separate or inherent)
  • actively maintained
  • small footprint
  • native code (rather than Java etc.)

1 Answer 1



  • Multi-platform
  • Python-based
  • command-line (binary name: img2pdf)
  • Repository & website: here.

A utility based on a Python library of the same name. To be honest, I just found it as an answer to this question about Windows.

A typical command-line:

img2pdf foo.jpg bar.jpg -o combined.pdf

the images are wrapped in a PDF in sequence, losslessly and without recompression, as requested.

Installation is through the Python package management mechanism, pip, i.e. you run:

pip install img2pdf

and it should just work. It will possibly pull some dependencies as well. Note, however, that this installation will be per-user, not system-wide.

Not the answer you're looking for? Browse other questions tagged or ask your own question.