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 doc document viewer: ASP.NET Office Word Document Viewer: view MS Office Word files online using C# in ASP.NET web applications
asp.net webforms pdf editor control: ASP.NET WebForms PDF Editor: create, view, edit, annotate, redact PDF file in ASP.NET WebForms application
asp.net dicom file viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net mvc file viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net azure file viewer: ASP.NET Azure Document Viewer: view, annotate files online using ASP.NET Cloud Service
asp.net iis file viewer: C# HTML5 Viewer: Deployment on IIS
asp.net webforms file viewer: ASP.NET WebForms application document viewer control: view, annotate, redact, convert files online in ASP.NET


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);