XDoc.PowerPoint
Features
Tech Specs
How-to C#
Pricing

C# PowerPoint Library
C# PowerPoint - PowerPoint Conversion & Rendering in C#.NET


Overview for How to Use XDoc.PowerPoint in C# .NET Programming Project



C#.NET PowerPoint document file creating library control, RasterEdge XDoc.PowerPoint SDK for .NET, is a robust & thread-safe .NET solution which provides a reliable and quick approach for C# developers to create a highly-secure and industry-standard PowerPoint document file. The PowerPoint document file created by RasterEdge C# PowerPoint document creator library is searchable and can be fully populated with editable text and graphics programmatically.

This Visual C# .NET PowerPoint document creation control toolkit can not only allow developers to generate standard PowerPoint document file but also offer them the ability to count the page numbers of generated PowerPoint document by simple C# programming code. As this PowerPoint document creator library is built in .NET Framework 2.0 and designed specifically for .NET applications, C# developers can easily use this professional PowerPoint document generating SDK in all .NET developing applications, including ASP.NET web services and Windows Forms application.

After creating a PowerPoint document in C#.NET using this PowerPoint document creating toolkit, if you need to add some text and draw some graphics on created PowerPoint document file, you can also use this C#.NET PowerPoint document drawing library control.


How to create Microsoft Office PowerPoint document using C#?

  1. Download XDoc.PowerPoint C# PPTX document library
  2. Install C# PPTX library to create Microsoft PowerPoint file in .NET applications
  3. Step by Step Tutorial












Create New PowerPoint Document With One Blank Page in C# Project

In C# class programming, you can use specific APIs to create PowerPoint file. And the PowerPoint document can contain one empty page or multiple empty pages. The following example will tell you how to create a PowerPoint document with one empty page.

String outputFile = Program.RootPath + "\\" + "output.pptx";

//  Create a new PowerPoint Document object with one blank page
PPTXDocument doc = PPTXDocument.Create(outputFile);

//  Save the new created PowerPoint document into file
doc.Save(outputFile);


Create PowerPoint Document From Existing PowerPoint File Using C#

You may also load or create a PowerPoint document object from existing PowerPoint file in C#.net.

//  Load from a file
String inputFilePath1 = Program.RootPath + "\\" + "1.pptx";
PPTXDocument doc1 = new PPTXDocument(inputFilePath1);
if (doc1 == 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");
    //  ...
}