XDoc.PDF
Features
Tech Specs
How-to C#
How-to VB.NET
Pricing
File: Merge, Append PDF Files
Work with Other SDKs
File: Merge, Append PDF Files
  |  
Home ›› XDoc.PDF ›› C# PDF: Merge and Append PDF

C#.NET PDF Library - Merge PDF Documents in C#.NET


Provide C# Demo Codes for Merging and Appending PDF Document in Visual C#.NET Program




Professional C#.NET PDF SDK for merging PDF file merging in Visual Studio .NET


.NET components for batch combining PDF documents in C#.NET class


Powerful library dlls for mering PDF in both C#.NET WinForms and ASP.NET WebForms


Free online C#.NET source code for combining multiple PDF pages together in .NET framework


Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint


Combine scanned images to PDF, such as tiff, jpg, png, gif, bmp, etc


Merge Microsoft Office Word, Excel and PowerPoint data to PDF form


Append one PDF file to the end of another and save to a single PDF file


Merge PDF with byte array, fields


Merge PDF without size limitation


RasterEdge C#.NET PDF document merging toolkit (XDoc.PDF) is designed to help .NET developers combine PDF document files created by different users to one PDF file. Thus, C#.NET PDF document merge library control can be counted as an efficient .NET doc solution for keeping PDF document files organized.


This C# .NET PDF document merging control is written in managed C# code and compatible with all .NET developing platforms, like ASP.NET web application and Windows Forms project. Using this PDF document concatenating library SDK, C# developers can easily merge and append one PDF document to another PDF document file, and choose to create a new PDF file in .NET class application.


Besides C#.NET PDF document merging function, XDoc.PDF, a professional third-party .NET document imaging toolkit, also offers other advanced PDF document page processing and manipulating functions, such as PDF page insertion, PDF page deleting, PDF document splitting, PDF page reordering and PDF page image and text extraction. Remarkably, all those C#.NET PDF document page processing functions can be implemented independently, without using any Adobe-related software.


Our .NET PDF SDK empowers C# programmers to easily merge and append PDF files with mature APIs. To be more specific, two or more input PDF documents can be merged and appended together according to its loading sequence, and then saved and output as a single PDF with user-defined location.




C#.NET DLLs: Merge PDF Document



In order to run the sample code, the following steps would be necessary.


Add necessary references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Raster.dll


  RasterEdge.XDoc.Raster.Core.dll


  RasterEdge.XDoc.PDF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.PDF;




C# Demo Code: Combine and Merge Multiple PDF Files into One in.NET



This part illustrates how to combine three PDF files into a new file in C# application. You may also combine more PDF documents together.




String inputFilePath1 = Program.RootPath + "\\" + "1.pdf";
String inputFilePath2 = Program.RootPath + "\\" + "2.pdf";
String inputFilePath3 = Program.RootPath + "\\" + "3.pdf";
String outputFilePath = Program.RootPath + "\\" + "Output.pdf";
String[] inputFilePaths = new String[3] { inputFilePath1, inputFilePath2, inputFilePath3 };

// Combine three PDF files and output.
PDFDocument.CombineDocument(inputFilePaths, outputFilePath);





C# Demo Code: Append PDF Document in 。NET



In addition, C# users can append a PDF file to the end of a current PDF document and combine to a single PDF file.




//  get PDFDocument object from one file
String inputFilePath1 = Program.RootPath + "\\" + "1.pdf";
PDFDocument doc1 = new PDFDocument(inputFilePath1);
//  get PDFDocument object from another file
String inputFilePath2 = Program.RootPath + "\\" + "2.pdf";
PDFDocument doc2 = new PDFDocument(inputFilePath2);

//  append the 2nd document
doc1.AppendDocument(doc2);

//  save the document
String outputFilePath = Program.RootPath + "\\" + "Output.pdf";
doc1.Save(outputFilePath);