Format Guide15 min read

9 Ways to Convert an Image to PDF (JPG, PNG and HEIC)

Turn photos and screenshots into a PDF - built-in tools on macOS, Windows, iPhone and Android, plus img2pdf, ImageMagick and Acrobat. Which methods re-encode your images, and how to stop them.

By ImageGuide Team·Published August 15, 2026·Updated August 15, 2026
pdfjpg to pdfpng to pdfheic to pdfconversionscanning

Almost nobody wants a PDF for its own sake. They want one file instead of twelve, in a format that opens everywhere, that a printer, a landlord, a university portal or a customs form will accept.

Every operating system can already do this, and most people install something anyway. This guide covers the nine methods that work, and the one detail that separates a good result from a bloated, blurry one: whether the tool re-encodes your images or embeds them untouched.

Pick Your Method First

# Method Cost Batch? Re-encodes?
1 Browser converter Free Yes Optional
2 macOS Preview and Finder Included Yes Yes
3 Windows Print to PDF Included Yes Yes
4 iPhone and iPad Included Yes Yes
5 Android Included Limited Yes
6 img2pdf Free Yes No
7 ImageMagick Free Yes Yes
8 Word, Docs, LibreOffice Included Manual Yes
9 Adobe Acrobat Subscription Yes Configurable

The Thing Everyone Gets Wrong First

A PDF is a container, not a compressor. When you put a JPEG inside a PDF, one of two things happens.

The tool embeds the JPEG stream as it is. The bytes of your photo are copied into the file. Quality is identical to the original because nothing was decoded or re-encoded. The PDF is roughly the size of your images plus a few kilobytes.

The tool decodes the JPEG and re-encodes it. Now a second generation of lossy compression sits on top of the first. Fine detail softens, and JPEG artifacts from the first encode get treated as real detail and preserved at cost. The file can come out larger than the source images while looking worse.

Most convenient methods do the second thing. That is usually fine for a receipt. It is not fine for a photography portfolio or a document someone will zoom into.

Method 6 is the one that never re-encodes. If quality matters, skip to it.

1. A Browser Converter

The fastest path that does not depend on which computer you are sitting at.

ImageGuide’s converters run entirely in your browser using WebAssembly. The files are never uploaded, so there is no server to trust and no upload wait:

  • JPG to PDF — combine JPEG photos into one document
  • PNG to PDF — screenshots and graphics with transparency flattened
  • HEIC to PDF — straight from an iPhone, no conversion step first
  • Image to PDF — mixed formats in one go

Drop in multiple files, reorder them, and get one PDF. Because it runs locally, a 200 MB folder of photos is limited by your own machine rather than an upload cap.

When This Is the Right Answer

  • You have a handful of images and want it done in ten seconds
  • The images are sensitive and you do not want them on someone’s server
  • You are on a locked-down work machine where you cannot install anything

2. macOS Preview and Finder

macOS has two built-in routes, and the Finder one handles batches.

Finder, for several images at once:

  1. Select the images in Finder, in the order you want them
  2. Right-click → Quick ActionsCreate PDF
  3. A PDF appears in the same folder, one image per page

The page order follows your current Finder sort, not your click order. Sort by name first, and give your files names that sort correctly (see the numbering trap below).

Preview, for one image or for reordering:

  1. Open the image in Preview
  2. FileExport as PDF

To combine files in Preview, open the first one, show the sidebar (ViewThumbnails), then drag the other images into the sidebar. Drag thumbnails to reorder, and delete any you do not want. FileExport as PDF writes the result.

Preview reads HEIC natively, so iPhone photos need no conversion first.

Limits

Both routes re-encode. Preview also applies its own compression, and offers no quality control in the export dialog. For anything where fidelity matters, use img2pdf.

3. Windows Print to PDF

Windows has no “convert to PDF” command, but it has a printer that writes PDFs, which amounts to the same thing.

  1. Select the images in File Explorer
  2. Right-click → Print
  3. In the Print Pictures dialog, set Printer to Microsoft Print to PDF
  4. Choose a layout on the right — Full page photo gives one image per page
  5. Uncheck Fit picture to frame unless you want the image cropped to the page shape
  6. Click Print, then choose where to save

That checkbox matters. “Fit picture to frame” fills the page and crops whatever does not fit, which quietly cuts the edges off a portrait photo on a landscape page. Unchecking it letterboxes the image instead, keeping all of it.

The Margin Problem

Print to PDF applies printer margins, so your image never reaches the page edge. There is no setting to remove them in the Photos path. If you need edge-to-edge output, use method 6 or 7, which write the PDF directly rather than pretending to print it.

4. iPhone and iPad

Three routes, in increasing order of control.

Files app — the cleanest for photos already saved as files:

  1. Open Files, tap Select, choose your images
  2. Tap the button → Create PDF
  3. Multiple images become one multi-page PDF, in the order they are listed

Photos, via the print sheet — the well-known trick:

  1. Select photos in Photos, tap SharePrint
  2. On the print preview, pinch outward on the thumbnail
  3. The preview becomes a PDF; tap Share to save or send it

Shortcuts — for anything you do repeatedly. Build a shortcut with Make PDF taking the shortcut input, then Save File. Add it to the share sheet, and any selection of photos becomes a PDF in two taps. This is also the only iOS route where you can insert a resize step before the PDF is made, which is how you keep a 40-photo document under an email size limit.

Notice that all three accept HEIC directly. You never need to convert an iPhone photo to JPG first just to get it into a PDF.

5. Android

Android is less consistent than iOS, because the answer depends on which apps the manufacturer shipped.

Google Drive, which is on nearly every device:

  • Tap +Scan to photograph a document straight into a PDF, with automatic edge detection and perspective correction
  • Or upload images and use PrintSave as PDF

Files by Google and most gallery apps expose SharePrintSave as PDF, which is the same print-driver trick Windows uses.

Google Photos has no direct PDF export. Select photos, then PrintSave as PDF.

For a document rather than photos, the Drive scanner is worth using specifically. Perspective correction turns a photograph taken at an angle into a flat rectangular page, which every other method on this list leaves crooked.

6. img2pdf, the Lossless One

This is the method that answers the quality question. img2pdf embeds JPEG and JPEG 2000 data into the PDF without decoding it. The pixels in the output are bit-for-bit the pixels in your input.

# Install
pip install img2pdf
sudo apt install img2pdf        # Debian/Ubuntu
brew install img2pdf            # macOS

# One image
img2pdf photo.jpg -o photo.pdf

# A folder, in sorted order
img2pdf *.jpg -o album.pdf

# Set the page size instead of deriving it from pixel dimensions
img2pdf *.jpg --pagesize A4 -o album.pdf

# Fit the image inside a page with a border
img2pdf *.jpg --pagesize A4 --border 20mm -o album.pdf

# Force a DPI, which controls how large the image prints
img2pdf photo.jpg --imgsize 300dpi -o photo.pdf

Because it never re-encodes, img2pdf refuses to accept anything it cannot embed losslessly, and converts PNG to a lossless PDF image stream rather than to JPEG. A PNG screenshot stays crisp.

The Numbering Trap

*.jpg expands in the shell’s sort order, which is alphabetical, not numeric. So img10.jpg comes before img2.jpg, and your 12-page document is shuffled.

# Wrong order: 1, 10, 11, 12, 2, 3 ...
img2pdf *.jpg -o out.pdf

# Right order, using a numeric sort
img2pdf $(ls *.jpg | sort -V) -o out.pdf

Better still, pad your filenames when you create them: img001.jpg, img002.jpg. Then every tool on this list, including the Finder and File Explorer routes, gets the order right without help.

7. ImageMagick

More flexible than img2pdf, and it does re-encode, so use it when you want to change the images on the way in.

# Basic
magick *.jpg output.pdf

# Correct order
magick $(ls *.jpg | sort -V) output.pdf

# Resize on the way in, which is how you shrink a huge PDF
magick *.jpg -resize 2000x2000\> -quality 85 output.pdf

# Set page geometry explicitly
magick *.jpg -page A4 output.pdf

# Flatten transparency onto white, or PNGs get black backgrounds
magick *.png -background white -alpha remove -alpha off output.pdf

That last one catches people out. PDF has no reliable transparency handling for embedded raster images across all viewers, and a transparent PNG frequently renders with a black background. Flatten it yourself and the result is predictable.

The Density Flag Does Nothing Here

-density affects PDF input, not PDF output. Setting it before a JPEG changes nothing about the resulting PDF. To control print size, use -page or switch to img2pdf --imgsize.

8. Word, Google Docs and LibreOffice

Reach for these when the PDF needs to be more than a stack of pictures: captions, headings, page numbers, a title page, two images side by side.

Google Docs: InsertImage, arrange, then FileDownloadPDF Document.

Microsoft Word: insert images, then FileSave as Adobe PDF, or ExportCreate PDF/XPS.

LibreOffice Writer: insert, then the Export as PDF toolbar button, which exposes far more control than the others. In its dialog, the Images tab lets you choose lossless compression or set a JPEG quality, and set a maximum resolution in DPI. That is the only free GUI on this list with an honest quality slider.

Word in particular downsamples images to 220 DPI by default when it exports. In File → Options → Advanced → Image Size and Quality, set Do not compress images in file and choose High fidelity to stop it.

9. Adobe Acrobat

The paid answer, and the one that earns its keep on documents rather than photos.

  • ToolsCreate PDFMultiple Files for batch assembly
  • Scan & OCR makes the text inside a photographed page selectable and searchable
  • Optimize PDF exposes per-image-type compression settings and a downsampling threshold
  • Preflight can enforce a print standard such as PDF/X

If you are converting photographs of paperwork, the OCR step is the real reason to use it. A 40-page scanned PDF with no text layer cannot be searched, copied from, or read aloud by a screen reader. Our guide on extracting text from images covers free ways to add that layer.

The Online Converter Question

There are hundreds of “JPG to PDF” sites, and they mostly work. The question is not whether they work but what happens to your file.

Your images are uploaded to a server you do not control, converted there, and stored for some retention period stated in a privacy policy you did not read. For holiday photos, that is a fair trade. For a passport scan, a signed contract, a payslip, or medical paperwork — which is exactly what most people convert to PDF — it is a bad one.

Prefer, in order:

  1. A converter that runs in your browser, so nothing is uploaded at all
  2. A built-in operating system feature
  3. A command-line tool
  4. An online service, for content you would be relaxed about publishing

Every method in this guide except this section keeps the file on your own machine.

Controlling the File Size

The most common follow-up problem is a PDF that is too large to email. Attack it at the source.

Resize before converting, not after. A modern phone photo is 4000 pixels wide. Printed on A4 that is around 340 DPI, well past what any printer resolves and far past what a screen shows. 1500–2000 pixels on the long edge is plenty for a document.

# Resize a folder, then build the PDF
magick mogrify -path resized -resize 2000x2000\> -quality 85 *.jpg
img2pdf resized/*.jpg -o document.pdf

Use the right source format. Photographs belong in JPEG. Screenshots, scans of text, and line drawings belong in PNG, where they compress better and look sharper. Putting a screenshot through JPEG produces fuzzy text and a bigger file.

Compress the images first with a dedicated tool such as our image compressor, then assemble. A compressor tuned for photographs will beat a PDF writer’s generic setting. Our guide on reducing image file size goes through the trade-offs.

Do not re-compress an already compressed PDF. Running a finished PDF through an online “PDF compressor” re-encodes every image a third time. Rebuild it from the originals instead.

Page Size, DPI and Why Your Image Looks Small

A PDF page is measured in points, not pixels: 595 × 842 points for A4, 612 × 792 for US Letter. An image has pixels and no inherent physical size. Something has to decide the mapping, and different tools decide differently.

  • Derive the page from the image — the page is exactly the image’s size, so there are no margins and no letterboxing. This is img2pdf’s default, and the right choice for photo books and comics.
  • Fit the image to a fixed page — good for documents that will be printed, at the cost of white borders when the aspect ratios differ.

If your image appears tiny in the middle of a large page, a tool assumed a high DPI. If it appears blurry and oversized, it assumed 72 DPI. Set the page size explicitly and the guesswork stops.

Orientation

Phones record orientation as an EXIF tag rather than by rotating the pixels. Some converters honour that tag and some ignore it, which is why a photo that looks upright in your gallery lands sideways in the PDF.

# Bake the rotation into the pixels before converting
magick mogrify -auto-orient *.jpg

Do that once on a copy of the folder and every downstream tool agrees.

Summary

The Nine Methods

# Method Use it when
1 Browser converter You want it now, with nothing uploaded
2 macOS Preview and Finder You are on a Mac and need reordering
3 Windows Print to PDF You are on Windows with nothing installed
4 iPhone and iPad The photos are already on the phone
5 Android Especially the Drive scanner for documents
6 img2pdf Quality matters — nothing is re-encoded
7 ImageMagick You want to resize or flatten on the way in
8 Word, Docs, LibreOffice The PDF needs captions and layout
9 Adobe Acrobat Scanned paperwork that needs OCR

Checklist

  1. ✅ Filenames are zero-padded, so the page order is right
  2. ✅ EXIF rotation is baked in with -auto-orient
  3. ✅ Photos are JPEG, screenshots and scans are PNG
  4. ✅ Images are resized to about 2000 pixels before assembly
  5. ✅ Transparency is flattened onto white for PNG sources
  6. ✅ Page size is set explicitly rather than guessed
  7. ✅ Sensitive documents never went to an online converter
  8. ✅ Scanned text has an OCR layer, so it is searchable and accessible

For most people, method 1 or the built-in on the device they are holding is the answer. Reach for img2pdf the moment quality stops being negotiable.

Going the other way? See 9 ways to convert a PDF to JPG or PNG.

Related Resources

Format References

Ready to optimize your images?

Sirv automatically optimizes, resizes, and converts your images. Try it free.

Start Free Trial