PDF

img2pdf – lossless conversion of raster images to PDF

img2pdf is a small utility to losslessly convert raster images to PDF without unnecessarily re-encoding JPEG and JPEG2000 files.

You should use img2pdf if your priorities are (in this order):

  1. always lossless: the image embedded in the PDF will always have the exact same color information for every pixel as the input.
  2. small: if possible, the difference in filesize between the input image and the output PDF will only be the overhead of the PDF container itself
  3. fast: if possible, the input image is just pasted into the PDF document as-is without any CPU hungry re-encoding of the pixel data.

The software is written in the Python programming language.

Key Features

  • Able to handle much larger input than other software, because the raw pixel data never has to be loaded into memory.
  • For JPEG, JPEG2000, non-interlaced PNG and TIFF images with CCITT Group 4
    encoded data, img2pdf directly embeds the image data into the PDF without
    re-encoding it.
  • For all other input types, img2pdf first has to transform the pixel data to make it compatible with PDF. In most cases, the PNG Paeth filter is applied to
    the pixel data. For monochrome input, CCITT Group 4 is used instead. Only for
    CMYK input no filter is applied before finally applying flate compression.

Website: gitlab.mister-muffin.de/josch/img2pdf
Support:
Developer: Johannes ‘josch’ Schauer
License: GNU Lesser General Public License Version 3

img2pdf is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

PDF Manipulation Tools
Stirling PDFLocally hosted web based PDF manipulation tool
PDFsamExtract pages, split, merge, mix and rotate PDF files
PDF Mix ToolPerform common editing operations on PDF files
PDF ArrangerMerge, rearrange, split, rotate, and crop PDFs
cpdfSet of command-line tools that let you modify PDF files
pdftkThe PDF toolkit
pstoeditTranslates PostScript and PDF graphics into other vector formats
img2pdfLossless conversion of raster images to PDF
PDF ChainGraphical user interface for The PDF Toolkit
TabulaExtract data tables inside PDF files
PDFStitcherUtility for stitching together PDF pages
wkhtmltopdfRender HTML into PDF
kropSimple graphical tool to crop the pages of PDF files
Qpdf ToolsQt interface for Ghostscript and QPDF
Quick PDF JoinJoins multiple PDF files together
PDF TricksOffer small manipulations in PDF files
OnePDFPleaseTUI for working with PDF files
PdfJumblerRearrange, merge, delete, and rotate pages
PDF JugglerMix, reorder and select PDF pages
jpeg2pdfCommand-line tool which lets you convert images to PDF

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments