Merge PDF in C#
Powerful cross-platform .NET API for merging PDF files using C# code on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
Merge PDF to PDF using Aspose.Slides
Aspose.Slides for .NET is a powerful .NET library used to create, convert, merge, and manipulate presentations, PDFs, and other documents. When you merge PDF to PDF, you are effectively combining pages from 2 documents to obtain one PDF file. Aspose.Slides allows you merge PDFs in different ways. You get to merge PDFs with all their shapes, styles, texts, formatting, etc.
Merge PDF to PDF in C#
Using Aspose.Slides for .NET , you can merge PDF files quickly with just a few lines of code
C# code for merging PDF to PDF
using (Presentation pres = new Presentation())
{
pres.Slides.RemoveAt(0); // removes default empty slide
pres.Slides.AddFromPdf("firstFile.pdf");
pres.Slides.AddFromPdf("secondFile.pdf");
pres.Save("MergedFile.pdf", SaveFormat.Pdf);
}
How to merge 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 PDF files you want to merge.
Save the resulting PDF.
Merge PDF Files Online
Merge other files
You can also combine files in other formats to get a single file