C#: Online Guide
How To: powerpoint SDK
Load, Save Document
  |  
Home ›› XDoc.PowerPoint ›› C# PowerPoint: Load, Save Document

How to C#: Load, Save PowerPoint Document


Overview for How to Use XDoc.PowerPoint to load and save PowerPoint document in C# .NET Programming Project




RasterEdge XDoc.PowerPoint has provided three ways to create PowerPoint document object that are load from file, load from stream and load from byte array. get pdf page count c#, print pdf vb.net without acrobat, itextsharp add image to existing pdf vb.net, split pdf using c#, display first page of pdf as image in c#, c# pdf 417 reader. Conversely, the PowerPoint SDK can also save PowerPoint document object to file, stream or byte array.


Related .net document control helps:
asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net edit pdf image: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
asp.net annotate pdf: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net pdf viewer control: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net excel web viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.




C#: Import Dlls to Run PowerPoint Document Processing for .NET



Add necessary XDoc.PowerPoint DLL libraries into your created C# application as references. convert pdf to word in c#.net, read text from pdf c#, convert multiple images to pdf c#, c# split pdf by bookmark, reduce pdf file size vb net, how to generate pdf in c#, vb.net convert pdf to bitmap.


  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;




Load PowerPoint Document From Existing File Using C#



You may also load or create a PowerPoint document object from existing PowerPoint file in C#.net. display pdf in asp.net page, asp.net pdf preview, asp net remove image from pdf, show image in asp.net core mvc, open word document in asp.net mvc, c# mvc website pdf file in stored in byte array display in browser, pdf editor in asp net mvc.




//  Load from a file
String inputFilePath  = Program.RootPath + "\\" + "1.pptx";
PPTXDocument doc = new PPTXDocument(inputFilePath);
if (doc == null) throw new Exception("fail to load the file");
//  ...





Load PowerPoint From Stream Object in C# Project



PowerPoint document can be loaded from a stream object in C# programming.




//  Load from a stream
String inputFilePath = Program.RootPath + "\\" + "2.pptx";
using (FileStream fileStream = File.Open(inputFilePath, FileMode.Open, FileAccess.Read))
{
    PPTXDocument doc = new PPTXDocument(fileStream);
    if (doc == null) throw new Exception("fail to load PowerPoint document from the stream");
    //  ...
}





Load PowerPoint From Byte Array Object in C# Project



PowerPoint document can be loaded from a stream object in C# programming.




//  Load from a stream
String inputFilePath = Program.RootPath + "\\" + "2.pptx";
using (FileStream fileStream = File.Open(inputFilePath, FileMode.Open, FileAccess.Read))
{
    byte[] array = new byte[fileStream.Length];
    fileStream.Read(array, 0, array.Length);
    PPTXDocument doc = new PPTXDocument(fileStream);
    if (doc == null) throw new Exception("fail to load PowerPoint document from the stream");
    //  ...
}





Save PowerPoint Document To File in C# Project



PowerPoint document can be saved to a PowerPoint file in C# programming.




String inputFilePath = Program.RootPath + "\\" + "2.pptx";
String outputFilePath = Program.RootPath + "\\" + "output.pptx";
PPTXDocument doc = new PPTXDocument(fileStream);
if (doc == null) throw new Exception("fail to load PowerPoint document from the stream");
//  Save document to a Powerpoint file
doc.Save(outputFilePath);





Save PowerPoint Document To Stream Object in C# Project



PowerPoint document can be saved to a stream object in C# programming.




String inputFilePath = Program.RootPath + "\\" + "2.pptx";
Stream stream = new MemoryStream();
PPTXDocument doc = new PPTXDocument(fileStream);
if (doc == null) throw new Exception("fail to load PowerPoint document from the stream");
//  Save document  to  a stream object
doc.SaveToStream(stream);





Save PowerPoint Document To Byte Array in C# Project



PowerPoint document can be saved to a byte array object in C# programming.




String inputFilePath = Program.RootPath + "\\" + "2.pptx";
PPTXDocument doc = new PPTXDocument(inputFilePath);
if (doc == null) throw new Exception("fail to load PowerPoint document from the stream");
//  Save document to a byte array object
byte[] array = doc.SaveToByte();