Merge PDFs in C#

Nutrient .NET SDK (formerly GdPicture.NET) enables you to merge several documents in different formats into a single PDF document. For more information, see the list of supported file formats.

To merge several documents into a single PDF, use the GdPictureDocumentConverter class. You can also choose the PDF conformance level.

The code below converts a JPG image and a XLSX document into a single PDF of the 1.5 standard:

using GdPictureDocumentConverter gdpictureConverter = new GdPictureDocumentConverter();
IEnumerable<string> source = new List<string>(new string[] { @"C:\temp\source1.jpg", @"C:\temp\source2.xlsx" });
gdpictureConverter.CombineToPDF(source, @"C:\temp\output.pdf", PdfConformance.PDF1_5);

Used methods