Merge PDF files in C# and VB.NET

With PDF .Net, you canmerge PDF files into one PDF file in your C# or VB.NET application.

PDF pages are self-contained entities (their appearance is fully defined by their content stream and the associated resources, and their annotations primarily define their interactivity. That’s why you can easily clone them to other PDF files.

To merge PDF files, you simply need to clone all of their pages into a destination PDF file.

The following example shows how you can merge (concatenate) PDF files.

Complete code

using SautinSoft.Pdf;

class Program
	static void Main()
		// This property is necessary only for licensed version.
		//SautinSoft.Pdf.Serial = "XXXXXXXXXXX";

		// List of source file names.
		var fileNames = new string[]
			"list 1.pdf",
			"list 2.pdf",
			"well done.pdf"

		using (var document = new PdfDocument())
			// Merge multiple PDF files into single PDF by loading source documents
			// and cloning all their pages to destination document.
			foreach (var fileName in fileNames)
			using (var source = PDF .Net.Load(fileName))

			document.Save("Merge Fiels.pdf");



In the example above, you can see that the source PDF files are combined to clone the pages to a new PDF .Net, and then save it to a PDF file.

If you need a new code example or have a question: email us at or ask at Online Chat (right-bottom corner of this page) or use the Form below:

Questions and suggestions from you are always welcome!

We are developing .Net components since 2002. We know PDF, DOCX, RTF, HTML, XLSX and Images formats. If you need any assistance with creating, modifying or converting documents in various formats, we can help you. We will write any code example for you absolutely free.