Merge JPG to PDF in C#
Powerful cross-platform .NET API for merging JPG to PDF files using C# code on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
Merge JPG 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 JPG to PDF, you are effectively combining JPG images to get a single PDF file.
Merge JPG to PDF in C#
Using Aspose.Slides for .NET , you can merge JPG to PDF quickly with just a few lines of code
C# code for merging JPG to PDF
using (Presentation pres = new Presentation())
{
IPPImage image = pres.Images.AddImage(File.ReadAllBytes("image1.jpg"));
pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, 100, 100, image);
IPPImage image2 = pres.Images.AddImage(File.ReadAllBytes("image2.jpg"));
pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 200, 100, 100, image2);
pres.Save("MergedFile.pdf", SaveFormat.Pdf);
}
How to merge JPG 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 JPG images you want to merge together as picture frames.
Save the resulting PDF file.
Merge PDF Files Online
Merge other files
You can also combine files in other formats to get a single file