PNG to PDF logoPNG to PDF

Convert PNG to PDF Free with Offline Command-Line Tools

By the PNG to PDF team ·

A command-line window that writes a PDF page from PNG files on your own computer

The most private way to convert PNG to PDF free is a command-line tool on your own computer: nothing is uploaded, there are no accounts and no caps. img2pdf keeps the PNG data unchanged, and Pillow gives you image editing at the cost of re-encoding. The commands below were run on 2026-10-24, and each section says what to expect.

Convert PNG to PDF free with img2pdf

img2pdf describes itself as lossless conversion of raster images to PDF. It needs Python; install it with pip install img2pdf. The command takes the images in the order you list them and writes one multi-page PDF:

img2pdf 01.png 02.png 03.png -o out.pdf

Without -o the PDF goes to standard output. The project’s description says non-interlaced PNG without transparency is embedded directly, adding about 500 to 700 bytes per image. A test of the img2pdf entry point on 2026-10-24 produced one two-page PDF from a PNG and a JPG, and the Windows launcher img2pdf.exe with a list of three JPG files produced a PDF with three pages. Without page settings, a page takes the size of the image at 96 pixels per inch in this test, so a 600 by 400 pixel image gave a 6.25 by 4.17 inch page. Create PDF from images shows how to set a paper size.

A PNG with transparency was accepted too: img2pdf printed a message that it computes a separate soft mask to store the transparency, and the PDF image carried a soft mask entry.

Convert PNG to PDF free with Pillow

Pillow is a good choice when you also want to resize, crop or flatten the image first. Install it with pip install pillow.

from PIL import Image

files = ["01.png", "02.png", "03.png"]
images = [Image.open(f).convert("RGB") for f in files]
images[0].save("out.pdf", save_all=True, append_images=images[1:], resolution=150.0)

Pillow’s documentation says the PDF encoding depends on the image mode and is JPEG for RGB images, so this route stores your PNG pixels as lossy JPEG data. In the test, the images in the PDF used the JPEG filter. The resolution value sets the physical page size together with the pixel count: a 1240 by 1754 pixel image gave an 8.27 by 11.69 inch page at 150.

Which command-line route to use

Use img2pdf when quality matters and you only need to turn files into pages. Use Pillow when the images need editing. The overview of all PNG routes is in PNG to PDF, and Chrome, Word and Docs recipes are in convert PNG to PDF. The longer Python guide for JPG files, with layout functions, is convert JPG to PDF tool. If you would rather not install Python, image to PDF converter free download explains how to check a download before you run it.

FAQ

Can I convert PNG to PDF free without uploading the file?

Yes. img2pdf and Pillow run on your computer and send nothing anywhere.

Does img2pdf reduce PNG quality?

It embeds non-interlaced PNG without transparency directly, per its description. Other inputs are transformed first.

Do I need Python to convert PNG to PDF?

For these two tools, yes. Your system’s print-to-PDF feature needs no install.