C#: Online Guide
How To: powerpoint SDK
File: Merge PowerPoint Files
File: Merge PowerPoint Files
  |  
Home ›› XDoc.PowerPoint ›› C# PowerPoint: Merge PowerPoint Files

C# PowerPoint - Merge PowerPoint Documents in C#.NET


Provide C# Demo Codes for Merging and Appending PowerPoint Document




Overview



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


Related .net document control helps:
asp.net excel document viewer: ASP.NET Excel Document Viewer in C# Control: view office excel files online in ASP.NET web applications
asp.net edit pdf page: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net pdf editor: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net webforms pdf editor: ASP.NET WebForms PDF Editor: create, view, edit, annotate, redact PDF file in ASP.NET WebForms application
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: view, annotate, redact Adobe PDF files online in ASP.NET
asp.net webforms document viewer: ASP.NET WebForms application document viewer control: view, annotate, redact, convert files online in ASP.NET
asp.net edit pdf image: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#


This C# .NET PowerPoint 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 PowerPoint document concatenating library SDK, C# developers can easily merge and append one PowerPoint document to another PowerPoint document file, and choose to create a new PowerPoint file in .NET class application.


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


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




C# DLLs: Merge PowerPoint Files



Add necessary XDoc.PowerPoint DLL libraries into your created C# application as references.


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.PowerPoint.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.PowerPoint;




Combine and Merge Multiple PowerPoint Files into One Using C#



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




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

// Combine three PowerPoint files and output.
PPTXDocument.CombineDocument(inputFilePaths, outputFilePath);





Append PowerPoint Document in C#



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




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

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

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