Merge Image to PDF in C#
Powerful cross-platform .NET API for merging Image to PDF files using C# code on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
Merge Image to PDF using Aspose.Slides
Aspose.Slides for .NET is a powerful .NET library used to create, convert, merge, and manipulate presentations, PDFs, images, and other files. When you merge image to PDF, you are effectively combining images to obtain a single PDF file.
Merge Image to PDF in C#
Using Aspose.Slides for .NET , you can merge image to PDF quickly with just a few lines of code
C# code for merging Image to PDF
using (Presentation pres = new Presentation())
{
IPPImage image = pres.Images.AddImage(File.ReadAllBytes("image1.png"));
pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, 100, 100, image);
IPPImage image2 = pres.Images.AddImage(File.ReadAllBytes("image2.png"));
pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 200, 100, 100, image2);
pres.Save("MergedFile.pdf", SaveFormat.Pdf);
}
How to merge Image to PDF in C#
Install Aspose.Slides for .NET. See Installation .
Add the library as a reference in your project.
Create an instance of the Presentation class.
Load the images you want to merge together as picture frames.
Save the resulting PDF.
Merge PDF Files Online
Merge other files
You can also combine files in other formats to get a single file