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

C# PowerPoint - Delete PowerPoint Document Page in C#.NET


Provides Users with Mature Document Manipulating Function for Deleting PowerPoint Pages




Overview



C#.NET PowerPoint document page deleting library control (XDoc.PowerPoint) can be easily integrated into any C#.NET class applications to delete any unnecessary page from target existing PowerPoint document file. Using RasterEdge Visual C# .NET PowerPoint page deletion component, developers can easily select one or more PowerPoint pages and delete it/them in both .NET web and Windows applications.


Related .net document control helps:
asp.net mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net sharepoint document viewer: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
asp.net image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
asp.net tiff viewer: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net document viewer: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...
asp.net document viewer c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...


C#.NET PowerPoint page removing & deleting library control SDK is a mature component on the market, which can also provides other PowerPoint document page processing functions, such as PowerPoint document merging function, PowerPoint page rotating function, PowerPoint page insert function, PowerPoint page reordering function and PowerPoint document splitting function.


This tutorial offers three pieces of C# sample codes for PowerPoint page(s) deletion. XDoc.PowerPoint enables you to delete PowerPoint page(s) with customized options, including setting a single page, a series of pages, and random pages to be removed from PowerPoint file.




C# DLLs: Delete Page from 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;




Delete a Single PowerPoint Page from PowerPoint File in C#



How to delete a single page from a PowerPoint document.




String filepath = @"";
String outPutFilePath = @"";
PPTXDocument doc = new PPTXDocument(filepath);

// Detele page 2 (actually the third page).
doc.DeletePage(2);

// Save the file.
doc.Save(outPutFilePath);





Delete Consecutive Pages from PowerPoint in C#



How to delete a range of pages from a PowerPoint document.




String filepath = @"";
String outPutFilePath = @"";
PPTXDocument doc = new PPTXDocument(filepath);

// Detele a series of 3 pages, starting from the second page. 
doc.DeletePages(1, 3);

// Save the file.
doc.Save(outPutFilePath);





Delete Specified Pages from PowerPoint in C#



How to delete several defined pages from a PowerPoint document.




String filepath = @"";
String outPutFilePath = @"";
PPTXDocument doc = new PPTXDocument(filepath);

// Get PageIndexes.
int[] detelePageindexes = new int[] { 1, 3, 5, 7, 9 };

// Delete pages.
doc.DeletePages(detelePageindexes);

// Save the file.
doc.Save(outPutFilePath);