We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Syncfusion Feedback

Syncfusion is trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The Syncfusion PDF Library is a robust .NET PDF library that converts images into high-quality PDFs. It supports multiple image formats, including Bitmap, JPEG, GIF, PNG, TIFF, ICO, and ICON. The library seamlessly integrates with WinForms, WPF, Blazor, ASP.NET MVC, ASP.NET Core, UWP, and Xamarin on Windows, Linux, and MacOS. Customize your PDFs with adjustable margin, orientation, and size settings for optimal results.

Convert images to PDF using C#

The following code snippet demonstrates the conversion of an image to PDF using Syncfusion .NET PDF Library.

// Create an instance of the ImageToPdfConverter class. 
var imageToPdfConverter = new ImageToPdfConverter();
// Set the page size for the PDF.
imageToPdfConverter.PageSize = PdfPageSize.A4;
// Set the position of the image in the PDF. 
imageToPdfConverter.ImagePosition = PdfImagePosition.TopLeftCornerOfPage;
// Create a file stream to read the image file. 
using (var imageStream = new FileStream("Autumn Leaves.jpg", FileMode.Open, FileAccess.Read))
{
    // Convert the image to a PDF document using the ImageToPdfConverter. 
    var pdfDocument = imageToPdfConverter.Convert(imageStream);
    // Create a file stream for the output PDF file. 
    using (var outputFileStream = new FileStream(Path.GetFullPath("Output.pdf"), FileMode.Create, FileAccess.ReadWrite))
    {
        // Save the generated PDF document to the output file stream. 
        pdfDocument.Save(outputFileStream);
    }
    // Close the document. 
    pdfDocument.Close(true);
}

Key Features of Image to PDF Conversion

Explore the essential capabilities that make converting images to PDFs efficient and customizable.

Convert multi-frame TIFF images to PDF in .NET PDF.

Convert multi-frame TIFF images to PDF

TIFF images usually have multiple frames in a single file. To draw each frame on a page of a PDF document, you need to iterate each frame individually.

Customize Page size in .NET PDF.

Customize page size

Customize the page size when converting an image to PDF. You can also adjust the image size to fit the page.

Image transparency in .NET PDF.

Image transparency

Apply transparency to an image while converting it to PDF document, The transparent image can be positioned across the page, subtly visible behind the text and other elements, creating a professional and polished watermark effect.

Image rotation in .NET PDF.

Image rotation

You can rotate the image clockwise or counterclockwise by 90, 180, or 270 degrees, or any custom angle. This functionality is useful for adjusting images that are not oriented correctly or for creating a dynamic and visually appealing presentation.

Explore resources for converting images to PDF

Discover valuable resources from our blog and knowledge base on converting images to PDF.

How to Convert Image to PDF in ASP.NET Core

Blog

How to Convert Images to PDF in ASP.NET Core

How to create a PDF page based on image size

Knowledge base

How to create a PDF page based on image size

Remove images from PDF document

Documentation

Remove images from PDF document

Syncfusion .NET PDF Library Resources

Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.

Struggling to decide on the right product?

Our comprehensive competitor comparison of PDF framework will guide you to the perfect choice.

tick-mark 20+ Conversions support
tick-mark 50+ interactive demos
tick-mark 1.7M+ downloads
competitive-banner-FT-image

Frequently Asked Questions

Image-to-PDF conversion is the process of converting one or multiple image files (JPEG, PNG, TIFF, etc.) into a single PDF document. This allows for easier sharing, printing, and archiving of images.

You can extract images from a PDF document and reuse them for other purposes easily using the Syncfusion .NET PDF Library.

Syncfusion supports various image formats including JPEG, PNG, BMP, GIF, TIFF, etc., for conversion to PDF.

Yes, conversion methods allow you to combine multiple images into a single PDF document. This is particularly useful for creating photo albums, presentations, or reports.

Yes, scanned documents and photographs can be converted to PDF format using OCR (Optical Character Recognition optical character recognition).

The quality of images in a PDF document largely depends on the settings and compression options chosen during the conversion process.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Want to create, view, and edit PDF files in C# or VB.NET?

Start a free 30-day evaluation today!
DOWNLOAD FREE TRIAL

No credit card required.

Mobile Free Evaluation Section

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Scroll up icon