How to Convert Images to PDF: Complete Guide for JPG, PNG, and WebP
Why Convert Images to PDF?
PDF (Portable Document Format) was created by Adobe in 1992 to present documents consistently across any device, operating system, or software. When you convert images to PDF, you gain several advantages over sharing raw image files.
Document Sharing and Compatibility
PDF is the closest thing to a universal document format. Virtually every device — from smartphones to enterprise systems — can open PDF files without installing additional software. When you share a collection of images as a PDF, you can be confident the recipient will see exactly what you intended.
Key advantages:
- Consistent rendering across all devices and platforms
- No dependency on specific image viewers
- Built-in support in all major operating systems
- Universal format for email attachments
Print-Ready Output
PDF files are designed for print. When you convert images to PDF, you can:
- Set exact page sizes (A4, Letter, Legal, etc.)
- Control margins and image placement
- Ensure consistent color reproduction
- Include print marks and bleed areas
This makes PDF ideal for photo books, portfolios, brochures, and any document destined for physical printing.
Archival and Organization
PDF offers features that raw image files don’t:
- Multi-page documents: Combine dozens of images into a single file
- Embedded metadata: Add titles, authors, and keywords
- Password protection: Secure sensitive image collections
- Compression: Store images efficiently without visible quality loss
- Long-term preservation: PDF/A is an ISO standard for archival
Legal and Business Use
Many legal and business processes require PDF format:
- Contract signing (PDF supports digital signatures)
- Invoice submission
- Tax document filing
- Official record keeping
- Regulatory compliance documentation
PDF vs. Image Formats: A Comparison
Understanding when PDF is the right choice requires knowing how it compares to common image formats:
| Feature | JPEG | PNG | WebP | |
|---|---|---|---|---|
| Multi-page support | Yes | No | No | No |
| Text layer | Yes | No | No | No |
| Lossless quality | Optional | No | Yes | Optional |
| Print optimization | Yes | No | No | No |
| Password protection | Yes | No | No | No |
| Universal viewing | Yes | Yes | Yes | Mostly |
| Small file size | Good | Good | Large | Best |
| Editability | Limited | Yes | Yes | Yes |
| Metadata support | Extensive | EXIF | Limited | Limited |
When to use PDF:
- Sharing multiple images as one document
- Print-ready output
- Legal/business documents
- Archival purposes
- When you need password protection
When to keep image formats:
- Web display and social media
- Further editing needed
- Maximum quality preservation
- Smallest file size priority
How to Convert Images to PDF
Using PicKit
PicKit offers a free, browser-based image-to-PDF converter that handles all common image formats:
- Open PicKit’s Image to PDF converter
- Upload your images — drag and drop multiple files or click to browse
- Arrange the page order by dragging thumbnails
- Adjust settings (page size, orientation, margins)
- Download your PDF
The tool processes everything locally in your browser. Your images are never uploaded to any server, making it safe for sensitive documents like ID scans, medical records, or financial documents.
Supported input formats: JPEG, PNG, WebP, BMP, GIF, TIFF
Using the Command Line
ImageMagick
ImageMagick is a powerful command-line image processing suite available on all platforms:
# Convert a single image to PDF
convert photo.jpg output.pdf
# Convert multiple images into a multi-page PDF
convert page1.jpg page2.jpg page3.jpg multi-page.pdf
# Convert with specific page size (A4)
convert photo.jpg -page A4 output.pdf
# Convert with custom resolution (300 DPI for print)
convert photo.jpg -density 300 -page A4 output.pdf
# Convert all JPEGs in a directory to a single PDF
convert *.jpg combined.pdf
Note: ImageMagick re-encodes JPEG images, which can cause quality loss. For lossless JPEG-to-PDF conversion, use img2pdf instead.
img2pdf (Python)
img2pdf is a Python tool specifically designed for lossless image-to-PDF conversion. It embeds JPEG images directly into the PDF without re-encoding:
# Install
pip install img2pdf
# Convert a single image (lossless for JPEG)
img2pdf photo.jpg -o output.pdf
# Convert multiple images
img2pdf page1.jpg page2.jpg page3.jpg -o multi-page.pdf
# Convert all JPEGs in a directory
img2pdf *.jpg -o combined.pdf
# Specify page size
img2pdf --pagesize A4 photo.jpg -o output.pdf
Why img2pdf is better for JPEGs: Unlike ImageMagick, img2pdf embeds the original JPEG data stream directly into the PDF container. This means zero quality loss and faster processing since there’s no re-encoding step.
macOS Built-in (Automator / sips)
macOS has built-in tools for image-to-PDF conversion:
# Using sips (single image)
sips -s format pdf photo.jpg --out output.pdf
# Using cupsfilter (if CUPS is available)
cupsfilter photo.jpg > output.pdf
Or use the built-in Print dialog:
- Open the image in Preview
- Press
Cmd + P - Click the PDF dropdown in the print dialog
- Select Save as PDF
Using Windows Built-in Tools
Print to PDF (Windows 10/11)
- Right-click the image → Print
- Select Microsoft Print to PDF as the printer
- Choose paper size and quality
- Click Print and choose a save location
Microsoft Photos
- Open the image in the Photos app
- Click the Print icon (or press
Ctrl + P) - Select Microsoft Print to PDF
- Click Print
Using Programming Approaches
Python (with Pillow and FPDF)
from PIL import Image
from fpdf import FPDF
def images_to_pdf(image_paths, output_path, page_size='A4'):
"""Convert multiple images to a multi-page PDF."""
pdf = FPDF()
for image_path in image_paths:
# Open image to get dimensions
img = Image.open(image_path)
width, height = img.size
# Calculate scaling to fit page
if page_size == 'A4':
page_w, page_h = 210, 297 # mm
elif page_size == 'Letter':
page_w, page_h = 215.9, 279.4 # mm
else:
page_w, page_h = 210, 297
margin = 10 # mm
available_w = page_w - 2 * margin
available_h = page_h - 2 * margin
# Scale image to fit within available area
scale = min(available_w / (width * 0.264583), available_h / (height * 0.264583))
scaled_w = width * 0.264583 * scale
scaled_h = height * 0.264583 * scale
pdf.add_page()
pdf.image(image_path, x=margin, y=margin, w=scaled_w, h=scaled_h)
pdf.output(output_path)
print(f"PDF saved to {output_path}")
# Usage
images_to_pdf(
['photo1.jpg', 'photo2.jpg', 'photo3.jpg'],
'output.pdf',
page_size='A4'
)
Python (with img2pdf library)
import img2pdf
def convert_lossless(image_paths, output_path):
"""Lossless conversion for JPEG images."""
with open(output_path, 'wb') as f:
f.write(img2pdf.convert(image_paths))
print(f"Lossless PDF saved to {output_path}")
# Usage
convert_lossless(['photo1.jpg', 'photo2.jpg'], 'output.pdf')
Node.js (with pdfkit)
const PDFDocument = require('pdfkit');
const fs = require('fs');
async function imagesToPdf(imagePaths, outputPath) {
return new Promise((resolve, reject) => {
const doc = new PDFDocument({ size: 'A4', margin: 50 });
const stream = fs.createWriteStream(outputPath);
doc.pipe(stream);
imagePaths.forEach((imagePath, index) => {
if (index > 0) doc.addPage();
doc.image(imagePath, {
fit: [500, 700], // Max width and height in points
align: 'center',
valign: 'center'
});
});
doc.end();
stream.on('finish', () => {
console.log(`PDF saved to ${outputPath}`);
resolve();
});
stream.on('error', reject);
});
}
// Usage
imagesToPdf(['photo1.jpg', 'photo2.jpg', 'photo3.jpg'], 'output.pdf');
Tips for Best PDF Output
1. Resize Images Before Converting
Oversized images create unnecessarily large PDFs. Resize images to the target print resolution before converting:
| Output Purpose | Recommended Resolution | Image Size (A4) |
|---|---|---|
| Screen viewing | 72-150 DPI | ~600 × 850 px |
| Standard print | 150-200 DPI | ~1250 × 1750 px |
| High-quality print | 300 DPI | ~2500 × 3500 px |
| Professional print | 300+ DPI | 2500+ × 3500+ px |
Use PicKit’s resize tool to adjust image dimensions before converting to PDF.
2. Compress Images Before Converting
Large images lead to large PDFs. Compress your images first to keep the final PDF manageable:
# Compress with ImageMagick before converting
convert input.jpg -quality 85 -resize 2500x3500\> compressed.jpg
convert compressed.jpg output.pdf
Use PicKit’s compress tool to reduce image file sizes before creating your PDF.
3. Convert to JPEG First for Smaller PDFs
If your images are in PNG format and don’t require transparency, convert them to JPEG first:
- A typical PNG photo: 3-8 MB
- The same photo as JPEG (quality 85): 500 KB - 2 MB
- Resulting PDF size difference: significant
Use PicKit’s format converter to change PNG to JPEG before creating your PDF.
4. Consider Page Orientation
Match the page orientation to your image:
- Landscape photos → Use landscape page orientation
- Portrait photos → Use portrait page orientation
- Mixed orientations → Let the tool auto-detect per page
5. Mind the Color Space
For print, convert images to CMYK color space. For screen viewing, keep sRGB. Most image-to-PDF tools handle this automatically, but if colors look wrong in the output, the color space may be the issue.
Common Use Cases
Photo Albums and Portfolios
Convert a collection of photos into a professional portfolio:
- Resize all images to consistent dimensions
- Compress to reasonable file sizes
- Convert to PDF using PicKit’s Image to PDF tool
- Share a single file instead of dozens of individual images
Scanned Documents
If you’ve scanned multiple pages as individual images:
- Ensure all scans are the same resolution
- Name files in order (page001.jpg, page002.jpg, etc.)
- Convert to a single multi-page PDF
- The resulting PDF works like any other document
Receipts and Invoices
Convert photo receipts into organized PDF files:
- Crop to remove unnecessary background
- Enhance readability if needed
- Convert to PDF for long-term storage
- PDFs are accepted by most expense management systems
Real Estate Listings
Combine property photos into a single downloadable PDF:
- Resize images to consistent dimensions
- Order photos logically (exterior → interior rooms → details)
- Convert to PDF for easy email attachment
- Clients receive a professional presentation
FAQ
Does converting an image to PDF reduce quality?
It depends on the method. Tools like img2pdf embed JPEG data directly without re-encoding, resulting in zero quality loss. Tools that re-encode images (like ImageMagick’s convert) may introduce slight quality loss, similar to saving a JPEG again. For best results, use PicKit’s Image to PDF converter or img2pdf for lossless conversion.
Can I convert multiple images into one PDF? Yes. Most image-to-PDF tools support multi-image input to create multi-page PDFs. PicKit’s tool lets you drag and drop multiple images and arrange their order before converting.
What’s the maximum number of images I can combine? There’s no strict limit, but practical considerations apply. Very large PDFs (hundreds of pages with high-resolution images) can be slow to open and may exceed email attachment limits (typically 25 MB). For large collections, consider splitting into multiple PDFs or compressing images before combining.
Can I add a password to the PDF?
PicKit’s image-to-PDF tool focuses on the conversion itself. For password protection, you can use additional tools like qpdf:
# Add password protection to an existing PDF
qpdf --encrypt "user-password" "owner-password" 256 -- input.pdf protected.pdf
Can I convert a PDF back to images?
Yes. You can extract individual pages from a PDF as images using tools like pdftoppm or online converters. However, the quality will depend on how the images were originally embedded in the PDF.
Why is my PDF so large? Large PDFs usually result from high-resolution, uncompressed images. To reduce PDF size: (1) Compress images before converting, (2) Resize to the needed dimensions, (3) Convert PNG to JPEG if transparency isn’t needed, and (4) Use appropriate quality settings (85% JPEG quality is usually sufficient).
Does the PDF preserve image transparency (PNG alpha channel)? PDF supports transparency, but not all image-to-PDF converters handle PNG alpha channels correctly. If transparency is important, test the output and consider using a tool that explicitly supports alpha channel preservation.