How to Merge Multiple Images into One PDF
Combine JPG, PNG, and other image files into one PDF on Windows, Mac, iPhone, Android, or with Python and Node.js.
To merge multiple images into one PDF, place the files in the order you want, use a PDF creation tool that accepts multiple images, and inspect the resulting pages for order, orientation, and sizing. The quickest method depends on your device.
Choose a method
| Platform | Method | Best for | Internet or subscription notes |
|---|---|---|---|
| Windows | File Explorer and Microsoft Print to PDF | A small batch of images | Requires the Microsoft Print to PDF printer to be available |
| macOS | Preview | Reordering images visually | Uses the built-in Preview app |
| iPhone | Notes | A few photos already on the phone | Steps can vary by iOS version |
| Android | Google Drive or a PDF app | Images stored on the phone or Drive | Steps can vary by Android version and app |
| Adobe Acrobat | Combine Files | Mixed images and PDFs with thumbnail reordering | Mobile combine workflows require an Acrobat subscription, login, and internet connection |
| Python or Node.js | Scripted PDF generation | Repeatable batch jobs and automation | Runs locally after dependencies are installed |
Windows: create one PDF with Print Pictures
- Put all images in one folder.
- Rename them with a sortable prefix if order matters, such as
01-cover.jpg,02-page.png, and03-receipt.jpg. - In File Explorer, select the images. Use Ctrl-click for individual files or Shift-click for a range.
- Right-click the selection and choose Print.
- Choose Microsoft Print to PDF as the printer.
- Select a paper size and layout. Review the preview, then choose Print.
- Enter a filename and save the PDF.
Open the saved file and check every page. Windows print layouts can place more than one image on a page, crop images, or add borders depending on the selected layout. Choose a one-image-per-page layout when each source image should become its own PDF page.
Mac: combine images with Preview
- Arrange the files in Finder in the intended sequence. Filename prefixes such as
01,02, and03make sorting predictable. - Select the images and open them with Preview.
- Show the thumbnail sidebar if it is hidden.
- Drag thumbnails into the desired order.
- Choose File > Print, then use the PDF menu and choose Save as PDF. On some macOS versions, you can also select thumbnails and use the PDF export command directly.
- Save the file, reopen it, and verify page order and orientation.
The exact Preview menu can differ between macOS releases. The essential workflow is the same: open the images together, reorder their thumbnails, and export the document as a PDF.
iPhone: make a multi-page PDF
A practical route described in government guidance is to use the Notes app:
- Create a new note.
- Use the attachment or camera control to add the photos in the required order.
- Open the note’s sharing menu.
- Choose the PDF or print option available on your iOS version, then save or share the generated PDF.
Because iOS menus change, confirm that all pages are present after saving. If Notes does not offer the export route you need, use the Files app’s print preview or a PDF application that supports image import.
Android: use Google Drive or a PDF app
Google Drive is one documented Android route:
- Open Google Drive and start a scan or upload the images, depending on where the files are stored.
- Add each image in the required order.
- Choose the option to save or export the result as a PDF.
- Open the resulting file and inspect every page.
Android manufacturers and Drive versions expose different controls. If your version cannot add existing images as pages, use a PDF app with an image-to-PDF function. Check whether that app requires an account, subscription, or an internet connection before importing sensitive files.
Adobe Acrobat: combine images and PDFs
Acrobat desktop supports combining images with PDFs and other supported files. In Acrobat, open Combine Files (the menu location differs between Windows and macOS), add the images, and use the thumbnail preview to reorder or remove pages before choosing Combine and saving the PDF. Adobe’s interface can change with product updates, so use the current command name shown in your installed version.
Acrobat’s documented mobile image and combine workflows require a subscription. The mobile combine workflow also requires login and an internet connection, and Adobe documents a limit of up to 12 files for that workflow. That limit applies to the documented Acrobat mobile feature, not to PDF creation in general.
Python: merge images into a PDF
For repeatable local jobs, Pillow can convert a list of images into a single PDF. Install it with python -m pip install pillow, then save this as images_to_pdf.py:
from pathlib import Path
from PIL import Image
files = [
Path("01-cover.jpg"),
Path("02-page.png"),
Path("03-receipt.jpg"),
]
images = []
for filename in files:
with Image.open(filename) as source:
# PDF output uses RGB or RGBA-compatible pages.
page = source.convert("RGB")
images.append(page.copy())
if not images:
raise ValueError("No input images were provided")
first, *rest = images
first.save("merged.pdf", save_all=True, append_images=rest)
for image in images:
image.close()
print("Wrote merged.pdf")
The list order becomes the PDF page order. Converting to RGB avoids failures caused by palette-based, grayscale, or some transparency modes. This creates one PDF page per image; it does not guarantee a particular paper size or preserve every image’s original physical dimensions.
Python: merge every image in a folder
from pathlib import Path
from PIL import Image
folder = Path("images")
allowed = {".jpg", ".jpeg", ".png", ".webp", ".tif", ".tiff"}
files = sorted(p for p in folder.iterdir() if p.suffix.lower() in allowed)
if not files:
raise SystemExit("No supported images found")
pages = []
for filename in files:
with Image.open(filename) as source:
pages.append(source.convert("RGB").copy())
pages[0].save("merged.pdf", save_all=True, append_images=pages[1:])
for page in pages:
page.close()
print(f"Merged {len(files)} images into merged.pdf")
Use explicit filenames when legal, financial, or evidentiary page order matters. Alphabetical sorting is only as reliable as your filenames.
Node.js: create a PDF with image pages
Install pdf-lib with npm install pdf-lib. This script embeds JPEG and PNG files, gives each image a page sized to its pixel dimensions, and writes one PDF:
const fs = require('node:fs/promises');
const path = require('node:path');
const { PDFDocument } = require('pdf-lib');
(async () => {
const files = ['01-cover.jpg', '02-page.png', '03-receipt.jpg'];
const pdf = await PDFDocument.create();
for (const filename of files) {
const bytes = await fs.readFile(filename);
const extension = path.extname(filename).toLowerCase();
const image = extension === '.png'
? await pdf.embedPng(bytes)
: await pdf.embedJpg(bytes);
const page = pdf.addPage([image.width, image.height]);
page.drawImage(image, {
x: 0,
y: 0,
width: image.width,
height: image.height,
});
}
await fs.writeFile('merged.pdf', await pdf.save());
console.log(`Wrote ${files.length} pages to merged.pdf`);
})().catch((error) => {
console.error(error);
process.exitCode = 1;
});
pdf-lib does not decode every image format. Convert unsupported formats such as WebP or TIFF to JPEG or PNG first, or use an image processing library before embedding.
cURL and APIs
cURL by itself does not merge local image files into a PDF. It can call a service that accepts images, or download a PDF produced by another program. For sensitive images, prefer a local workflow unless you have confirmed the service’s upload, retention, and privacy terms.
Page order, orientation, and sizing checklist
- Order: Rename files with zero-padded numbers or reorder thumbnails before exporting.
- Orientation: Check portrait and landscape pages individually. A viewer may rotate display automatically while the page remains differently oriented.
- Page size: Desktop print workflows may fit images to Letter, A4, or another selected paper size. Scripted workflows may use image pixel dimensions instead.
- Cropping: Inspect edges for clipped content, especially screenshots and scanned receipts.
- Quality: Zoom into text and fine lines. The reviewed procedural sources do not establish universal compression or resolution behavior across tools.
- Transparency: Transparent PNGs may be flattened against a background during conversion. Inspect logos, signatures, and screenshots with transparent regions.
- Metadata: If privacy matters, review whether the output retains metadata such as location or camera information.
- Originals: Keep the source images until the PDF has been opened, checked, and stored where intended.
Or skip the browser setup
If the images are on a webpage and your real goal is a clean PDF of that page, ScreenshotNeo can capture the page directly. Its API returns a PDF or image from one GET request; see the ScreenshotNeo documentation for options such as paper size, margins, landscape mode, page ranges, waits, custom CSS, and full-page capture.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' }); const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the page verdict and billing status. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots each month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Troubleshooting
Pages appear in the wrong order
Most tools use filename order or import order. Rename files with zero-padded prefixes, such as 01 through 12, or reorder thumbnails before exporting.
Images are cropped
The selected print layout may be filling a paper region rather than fitting the entire image. Choose a fit-to-page or one-image-per-page option and inspect the preview. In code, draw the complete image inside the page bounds.
Some pages are rotated
Camera orientation metadata can be interpreted differently by applications. Open and rotate the source image before conversion, or normalize orientation in an image library, then regenerate the PDF.
The PDF has a blank page
Check for an empty input file, an unsupported color mode, or a failed image decode. In Python, convert pages to RGB. In Node.js, ensure JPEG files use embedJpg and PNG files use embedPng.
Text looks blurry
PDF creation cannot restore detail already lost in a low-resolution image. Start with the original files, avoid repeated JPEG recompression, and inspect the output at high zoom.
Acrobat mobile will not combine files
The documented mobile workflow requires an Acrobat subscription, login, and internet connection, and supports up to 12 files in that workflow. Use Acrobat desktop or a local script for a larger batch.
The script fails on WebP or TIFF
Convert those files to PNG or JPEG first, or add a decoder that supports the format. The Node.js example intentionally handles JPEG and PNG only.
Performance, reliability, and cost
- Small batches: A desktop or phone workflow is usually simplest when there are only a few files.
- Large batches: A script avoids repetitive clicking and makes the input order explicit. Process files in groups if memory becomes a problem.
- Reliability: Preserve originals, write the output to a new filename, and reopen the PDF as a verification step.
- Cost: Windows, macOS Preview, and local Python or Node.js workflows do not require a paid PDF subscription. Acrobat mobile’s documented combine feature does require a subscription.
- Privacy: Local tools keep files on your device. Before uploading documents to an online service, check its retention and privacy terms.
- Automation: Record the exact input list, output filename, and conversion settings so a later run produces the same page sequence.
FAQ
Can I combine JPG and PNG files in one PDF?
Yes. Desktop PDF tools and the Python example can combine both. In Node.js, embed each format with its matching image function.
Will each image become a separate page?
Not always. Print layouts may place multiple images on one sheet. Select one image per page, or use a script that explicitly adds one page for each file.
Do I need Adobe Acrobat?
No. Windows, Preview, Notes, Google Drive, Python, and Node.js provide other routes. Acrobat is useful when you want mixed-file combining and thumbnail controls.
Can I merge images without uploading them?
Yes. Windows, macOS, Python, and Node.js can create the PDF locally.
Can ScreenshotNeo merge local image files?
The shown ScreenshotNeo call captures a URL. It is useful when the source is a webpage and you want a clean PDF capture; use a local image-to-PDF workflow for files that exist only on your device.


