C#: Online Guide
How To: powerpoint SDK
Page: Insert PowerPoint Pages
Page: Insert PowerPoint Pages
  |  
Home ›› XDoc.PowerPoint ›› C# PowerPoint: Insert PowerPoint Pages

C# PowerPoint - Insert Blank PowerPoint Page in C#.NET


Guide C# Users to Insert (Empty) PowerPoint Page or Pages from a Supported File Format




Overview



C#.NET PowerPoint document editor library control, RasterEdge XDoc.PowerPoint, offers easy & mature APIs for developers to add & insert an (empty) page into an existing PowerPoint document file. Besides, this PowerPoint document page inserting library control toolkit allows developers to specify where they want to insert (blank) PowerPoint document page (before the first page or after the last page or after any desired page of current PowerPoint document) using C# .NET class code.


Related .net document control helps:
asp.net document viewer: ASP.NET Document Viewer Control in C#: View, Annotate, Redact web document files in ASP.NET using C#
asp.net edit pdf text: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net powerpoint document viewer: ASP.NET PowerPoint Document Viewer Control: view pptx files online in C# using ASP.NET
asp.net dnn pdf editor: ASP.NET DNN PDF Editor Control: view, edit PDF files in Dotnetnuke application
asp.net image viewer: ASP.NET Image Document Viewer Control: view, annotate, redact, convert image files in html web browser
asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net azure document viewer: ASP.NET Azure Document Viewer: view, annotate files online using ASP.NET Cloud Service


This C# .NET PowerPoint document page inserting & adding component from RasterEdge is written in managed C# code and designed particularly for .NET class applications. Thus, using this PowerPoint document page manipulating and processing control SDK, you can create & add new PowerPoint page(s) to current target PowerPoint document in both web server-side application and Windows Forms project using a few lines of simple C# code.


Apart from the ability to inserting a new PowerPoint page into existing PowerPoint document file, RasterEdge C# .NET PowerPoint document page processing and editing control toolkit also owns other advanced PowerPoint document page manipulating functions. RasterEdge offers detailed guidances for each of those page processing functions, such as how to merge PowerPoint document files by C# code, how to rotate PowerPoint document page, how to delete PowerPoint page using C# .NET, how to reorganize PowerPoint document pages and how to split PowerPoint document in C# .NET class application.


By using reliable APIs, C# programmers are capable of adding and inserting (empty) PowerPoint page or pages from various file formats, such as PowerPoint, Tiff, PowerPoint, PowerPoint, PowerPoint, Bmp, Jpeg, Png, Gif, and so on. Some C# demos are provided for your reference.




C# DLLs: Insert Page to PowerPoint File



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;




Add and Insert a blank Page to PowerPoint File in C#



This C# demo will help you to insert a PowerPoint page to a DOCXDocument object at specified position.




String inputFilePath1 = Program.RootPath + "\\" + "1.pptx";
String outPutFilePath = Program.RootPath + "\\" + "Output.pptx";

PPTXDocument doc1 = new PPTXDocument(inputFilePath1);
// Specify a position for inserting the selected page.
int pageIndex = 2;

// Insert the page to the PPTXDocument at specified position.
doc1.AddEmptyPage( pageIndex);

// Output the new document.
doc1.Save(outPutFilePath);





Add and Insert Multiple PowerPoint Pages to PowerPoint Document Using C#



Moreover, you may use the following C# demo code to insert multiple pages of a PowerPoint file to a PPTXDocument object at user-defined position.




String inputFilePath1 = Program.RootPath + "\\" + "1.pptx";
String outPutFilePath = Program.RootPath + "\\" + "Output.pptx";

PPTXDocument doc1 = new PPTXDocument(inputFilePath1);
// Specify a position for inserting the selected pages.
int pageIndex = 1;

// Insert the pages to the second document at specified position.
doc2.InsertPages(pages, pageIndex);

// Output the new document.
doc2.Save(outPutFilePath);