How to Convert an Image to PDF on Any Device
Converting an image to PDF is one of those tasks that sounds simple until you actually need to do it. Maybe you are submitting a form that only accepts PDF uploads. Maybe you are assembling a photography portfolio, archiving receipts, or combining several screenshots into a single document for a client. Whatever the reason, every major operating system has a built-in way to do it — no app store downloads, no sketchy upload-your-files-to-our-server websites.
This guide covers every platform and every common image format: JPG, PNG, HEIC, WebP, TIFF, and more. If you are working with a format that does not embed directly into PDF (like HEIC or WebP on some platforms), you may need to convert it to JPG or PNG first before following these steps.
Convert Images to PDF on Windows
Windows has shipped with Microsoft Print to PDF since Windows 10. It works from any application that can open an image, which means it handles JPG, PNG, BMP, TIFF, and GIF without any extra software.
Single Image
- Right-click the image file and select Open with > Photos (or any image viewer).
- Press Ctrl + P or click the print icon.
- Under Printer, select Microsoft Print to PDF.
- Adjust page size, orientation, and margins. For photos, Landscape and Fit to page usually produce the best result.
- Click Print. Choose a save location and filename.
The resulting PDF contains your image at the resolution you selected.
Multiple Images into One PDF
- Open File Explorer and navigate to the folder containing your images.
- Select all the images you want to include. Hold Ctrl and click each one, or use Ctrl + A to select everything in the folder.
- Right-click the selection and choose Print.
- Set the printer to Microsoft Print to PDF.
- In the print dialog, select a layout. Full page photo gives one image per page. Contact sheet tiles multiple images per page.
- Use the page controls at the bottom to verify the order. Windows sorts by filename, so rename files with numeric prefixes (01-, 02-, 03-) if order matters.
- Click Print and save.
WebP and HEIC on Windows
Microsoft Print to PDF works with any image format that Windows can display. Windows 11 supports WebP natively. For HEIC, install the HEIF Image Extensions from the Microsoft Store (free from the device manufacturer, or $0.99 for the codec pack). Once installed, HEIC files open in Photos just like JPGs, and Print to PDF works identically.
If you would rather avoid codec installs, convert HEIC to JPG first and then follow the steps above.
Try it yourself
Convert between any image format instantly — free, instant, no signup. Your images never leave your browser.
Convert Images to PDF on Mac
macOS Preview is one of the most underrated built-in apps on any platform. It handles image-to-PDF conversion effortlessly.
Single Image
- Double-click the image to open it in Preview (the default for most image formats).
- Go to File > Export as PDF.
- Choose a filename and save location. Click Save.
Preview preserves the original image resolution and embeds it in a single-page PDF.
Multiple Images into One PDF
- In Finder, select all the images you want to combine.
- Right-click and choose Open With > Preview.
- In Preview's sidebar, you will see thumbnails for each image. If the sidebar is hidden, press View > Thumbnails or Cmd + Option + 2.
- Drag the thumbnails in the sidebar to reorder them as needed.
- Select all thumbnails in the sidebar (Cmd + A).
- Go to File > Print (or press Cmd + P).
- In the bottom-left corner of the print dialog, click the PDF dropdown and select Save as PDF.
- Name your file and save.
Quick Actions (macOS Monterey and Later)
macOS 12 Monterey introduced Quick Actions for PDFs:
- Select one or more images in Finder.
- Right-click and go to Quick Actions > Create PDF.
- macOS generates a PDF immediately in the same folder.
This is the fastest method for batch conversion, but you get less control over page order and layout.
HEIC and WebP on Mac
macOS supports HEIC natively — no extra downloads needed. WebP support was added in macOS Big Sur (11.0). Both formats work with all the methods above. If you are on an older macOS version and need to handle WebP, convert to PNG first.
Convert Images to PDF on iPhone and iPad
iOS has two reliable methods, and neither requires a third-party app.
Method 1: The Files App
- Open the Photos app and select the image (or images — tap Select and choose multiple).
- Tap the Share button (the square with an arrow).
- Choose Save to Files and pick a location in the Files app.
- Open the Files app and navigate to the saved image(s).
- Long-press the image and select Quick Actions > Create PDF.
For multiple images: select all images in the Files app, tap the three-dot menu (⋯) at the bottom-right, and choose Create PDF. iOS combines them into a single PDF in the order they were selected.
Method 2: The Print Trick
This method works from any app that can display an image:
- Open the image in Photos (or any app).
- Tap the Share button and select Print.
- On the print preview screen, pinch outward on the preview thumbnail with two fingers.
- The preview expands into a full PDF view. From here, tap the Share button again to save, email, or send the PDF anywhere.
The pinch-to-PDF trick has worked since iOS 9 and it converts anything printable into a PDF — images, web pages, emails, notes.
HEIC on iOS
Every photo taken on an iPhone since the iPhone 7 (iOS 11+) is HEIC by default. Both methods above handle HEIC directly. If you need to share the image in a more compatible format before creating a PDF, learn what HEIC is and how to convert it.
Convert Images to PDF on Android
Two approaches work on virtually every Android device.
Method 1: Google Drive Scan-to-PDF
Google Drive is pre-installed on most Android devices:
- Open Google Drive.
- Tap the + button and select Scan.
- Instead of taking a new photo, tap the gallery icon to select an existing image.
- Select your image. Drive imports it as a scanned page.
- Add more pages by tapping + if you need a multi-image PDF.
- Tap Save. Choose a folder and filename. Drive saves it as a PDF.
The scan feature applies some document-oriented processing (contrast enhancement, perspective correction). For an unmodified conversion, use Method 2.
Method 2: Print to PDF
This works from any gallery app:
- Open the image in your gallery app (Google Photos, Samsung Gallery, or any third-party viewer).
- Tap the three-dot menu or Share button, then select Print.
- In the print dialog, tap the printer dropdown and select Save as PDF.
- Adjust paper size, orientation, and margins.
- Tap the PDF icon (download button) to save.
This method preserves the original image without any scan-style processing.
WebP and HEIC on Android
Android has supported WebP since Android 4.0. HEIC support varies by manufacturer and Android version — most devices running Android 10+ handle it. If your device cannot open a HEIC file, convert it to JPG first.
Convert Images to PDF with Command Line
For developers and anyone who needs to convert images in bulk, command-line tools are the fastest and most flexible option.
ImageMagick 7.1.1-29
ImageMagick handles virtually every image format and converts directly to PDF. License: Apache 2.0.
# Single image (any format)
magick input.jpg output.pdf
magick screenshot.png output.pdf
magick photo.webp output.pdf
# Multiple images into one PDF (mixed formats work)
magick img-001.jpg img-002.png img-003.webp combined.pdf
# All JPGs in a directory
magick *.jpg all-images.pdf
# HEIC to PDF (requires libheif delegate)
magick photo.heic photo.pdf
# Control quality and page size
magick input.jpg -density 150 -page A4 -gravity center output.pdf
ImageMagick 7.1.1-29 supports HEIC input if built with the libheif delegate. Check with magick identify -list format | grep HEIC.
Python with Pillow 10.4
Pillow is the standard Python imaging library. License: HPND (Historical Permission Notice and Disclaimer — permissive, similar to BSD).
from PIL import Image
from pathlib import Path
# Single image
img = Image.open("photo.png")
img.save("photo.pdf", "PDF", resolution=150.0)
# Combine multiple images
image_files = sorted(Path(".").glob("*.jpg"))
images = [Image.open(f).convert("RGB") for f in image_files]
if images:
first, *rest = images
first.save(
"combined.pdf",
"PDF",
resolution=150.0,
save_all=True,
append_images=rest,
)
The .convert("RGB") call is critical — Pillow requires RGB mode for PDF output. RGBA images (PNGs with transparency) will throw an error without it.
For HEIC input, add pillow-heif:
pip install pillow-heif==0.18.0
import pillow_heif
pillow_heif.register_heif_opener()
img = Image.open("photo.heic")
img.save("photo.pdf", "PDF", resolution=150.0)
Node.js with pdf-lib 1.17
pdf-lib creates PDFs programmatically and supports JPG and PNG embedding directly. License: MIT.
import { PDFDocument } from "pdf-lib";
import { readFile, writeFile } from "node:fs/promises";
const imageBytes = await readFile("photo.jpg");
const pdfDoc = await PDFDocument.create();
const image = await pdfDoc.embedJpg(imageBytes);
// For PNG: const image = await pdfDoc.embedPng(imageBytes);
const page = pdfDoc.addPage([image.width, image.height]);
page.drawImage(image, {
x: 0,
y: 0,
width: image.width,
height: image.height,
});
const pdfBytes = await pdfDoc.save();
await writeFile("photo.pdf", pdfBytes);
For WebP, HEIC, or AVIF input, decode the image to PNG or JPG first using Sharp (sharp@0.33.2, Apache 2.0 license) or convert the format with Pixotter's converter before processing.
Image Formats and PDF Compatibility
Not all image formats behave the same way when embedded in a PDF.
| Format | Embeds Natively in PDF | Conversion Needed | Typical Size Impact | Quality Notes |
|---|---|---|---|---|
| JPG | Yes — all tools | None | Small. Lossy compression keeps file size low. | Some generation loss if re-compressed during PDF creation. |
| PNG | Yes — all tools | None | Medium to large. Lossless = larger files for photos. | Pixel-perfect. Best for screenshots and diagrams. |
| WebP | Partial — ImageMagick and OS tools; not pdf-lib | Convert to JPG/PNG for pdf-lib | Small. Modern lossy/lossless codec. | Convert WebP to PNG if your tool does not accept it. |
| AVIF | Limited — ImageMagick 7.1+ with libavif | Convert to JPG/PNG for most tools | Very small. Excellent compression. | Newest format; least tool support. |
| HEIC | Limited — OS-native tools on Apple; ImageMagick with libheif | Convert to JPG for broad compatibility | Small. Apple's default camera format. | Most Windows and Linux tools need conversion first. |
| TIFF | Yes — ImageMagick and Pillow | Usually none for CLI tools | Large. Uncompressed or lightly compressed. | Common in print and archival workflows. |
| BMP | Yes — most tools | None | Very large. No compression. | Rarely used today. Convert to PNG to reduce PDF size. |
Tips for Image-to-PDF Conversion
Choose the Right Page Size
Most PDF tools default to A4 (210 × 297mm) or US Letter (8.5 × 11 inches). For images, you often want the page size to match the image dimensions instead. ImageMagick handles this automatically when you omit the -page flag.
Set Orientation to Match the Image
A landscape photo on a portrait page wastes space. Most print dialogs auto-detect orientation, but double-check the preview before saving.
Mind the Resolution
Screen resolution (72-96 DPI) looks fine on monitors but prints poorly. For PDFs you plan to print, use 150 DPI minimum and 300 DPI for high-quality output. In ImageMagick, set this with -density 300. In Pillow, use resolution=300.0.
Compress Before Converting
A 20MB TIFF becomes a 20MB+ PDF. If file size matters, reduce the image size before converting to PDF.
Order Matters for Multi-Image PDFs
Name files with numeric prefixes (001-cover.jpg, 002-intro.jpg) so glob patterns produce the correct sort order.
Use JPG for Photos, PNG for Screenshots
JPG produces smaller PDFs for photographs. PNG produces smaller PDFs for screenshots and diagrams. Using the wrong format can inflate your PDF by 3-10x.
FAQ
Can I convert multiple images to a single PDF?
Yes. Every platform supports it. On Windows, select multiple images before printing. On macOS, open all images in Preview and print them together. On iOS, select multiple images in the Files app and use Create PDF. On the command line, list all input files before the output filename: magick img1.jpg img2.png img3.jpg combined.pdf.
Does converting an image to PDF reduce quality?
It depends on the tool and settings. Most methods embed the image data without re-compressing it, so quality stays identical. To preserve quality, use the highest quality setting available and avoid converting formats unnecessarily (do not convert PNG to JPG to PDF — go directly from PNG to PDF).
How do I convert a HEIC image to PDF?
Apple devices handle HEIC-to-PDF natively using the iOS or macOS methods above. On Windows, install HEIF Image Extensions from the Microsoft Store, then use Print to PDF. On Linux, use ImageMagick 7.1.1-29 with libheif support: magick photo.heic photo.pdf. Or convert to JPG first and then create the PDF. For a dedicated walkthrough, see our HEIC to PDF guide.
What is the maximum image size for a PDF?
The PDF specification (ISO 32000-2:2020) limits a single page to 14,400 × 14,400 user units (200 × 200 inches at 72 DPI). In practice, you will hit memory limits before reaching this boundary. Most tools handle images up to 50-100 megapixels without issue.
Can I convert WebP to PDF?
Yes, but tool support varies. macOS (Big Sur+), Windows 11, and ImageMagick all handle WebP-to-PDF directly. For tools that do not support WebP input (like pdf-lib), convert the WebP to PNG or JPG first. Pixotter's format converter does this instantly in the browser.
Is there a way to batch-convert hundreds of images to individual PDFs?
Command-line tools handle this efficiently. With ImageMagick:
for file in *.jpg; do
magick "$file" "${file%.jpg}.pdf"
done
With Python and Pillow:
from PIL import Image
from pathlib import Path
for img_path in Path(".").glob("*.jpg"):
img = Image.open(img_path)
img.save(img_path.with_suffix(".pdf"), "PDF", resolution=150.0)
For JPG-specific batch conversion, see our JPG to PDF guide for additional options. If you are working on an iPhone and want built-in iOS methods without a desktop, see our iPhone image-to-PDF guide.
If your source images are in HEIC, WebP, or AVIF and your PDF tool does not accept them directly, convert the image format first. Pixotter's format converter handles format conversion (PNG, JPG, WebP, AVIF) entirely in your browser — nothing gets uploaded, and results are instant.
Try it yourself
Combine images into a single PDF document — free, instant, no signup. Your images never leave your browser.