Images To PDF
using IronPdf;
using System.IO;
using System.Linq;

// One or more images as IEnumerable. This example selects all JPEG images in a specific 'assets' folder.
var imageFiles = Directory.EnumerateFiles("assets").Where(f => f.EndsWith(".jpg") || f.EndsWith(".jpeg"));

// Converts the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(imageFiles).SaveAs("composite.pdf");

// Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
NuGet Download
PM > Install-Package IronPdf
Images To PDF

Images To PDF

Given a single image located on a computer at C:\images\example.png, you can quickly convert it into a PDF document by calling the IronPdf.ImageToPdfConverter.ImageToPdf method with its file path:

You can also convert multiple images into a single PDF document by passing a collection of image paths to ImageToPdfConverter.ImageToPdf:

To explore more about converting images to PDFs using IronPDF for enhancing your applications, or to discover the entire suite of developer tools offered by Iron Software, including IronBarcode, IronOCR, and more, visit the Iron Software website.

Learn to Convert Images to PDF with IronPDF

System.IO.Directory.EnumerateFiles

ImageToPdfConverter.ImageToPdf

View on GitHub

Ready to Get Started?

Nuget Downloads 21,739,885Version:2026.10just released