HTML JPG PDF XML PPT
Aspose.Slides  for .NET
PPT

PPT File Viewer for .NET

View presentation files such as PPT without Microsoft PowerPoint or Office Automation

View PPT File Using C#

In order to view PPT file, we’ll use

Aspose.Slides for .NET

API which is a feature-rich, powerful and easy to use API for C# platform to be used with any Viewer. Open

NuGet

package manager, search for Aspose.Slides and install. You may also use the following command from the Package Manager Console.

Package Manager Console Command


PM> Install-Package Aspose.Slides.NET

How to View PPT via C#

Aspose.Slides makes it easy for the developers to view the PPT file with just few lines of code.

  1. Instantiate a Presentation object & load the PPT file

  2. Create an instance of ResponsiveHtmlController for formatting

  3. Create an instance of HtmlOptions and set HtmlFormatter property

  4. Save the PPT presentation in HTML format

  5. Call Process.Start with path to resultant HTML to load PPT content in default browser

System Requirements

Aspose.Slides for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
  • Development environment like Microsoft Visual Studio
  • Aspose.Slides for .NET referenced in your project
 

C# example code to view PPT file


string output = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".html";

// instantiate a Presentation object & load the PPT file
using (var presentation = new Aspose.Slides.Presentation("templateppt"))
{
    // create HTML export controller
    var controller = new Aspose.Slides.Export.ResponsiveHtmlController();
    // create an instance of HtmlOptions and set HtmlFormatter property
    var htmlOptions = new Aspose.Slides.Export.HtmlOptions 
    { 
        HtmlFormatter = Aspose.Slides.Export.HtmlFormatter.CreateCustomFormatter(controller) 
    };

    // save the presentation in HTML
    presentation.Save(output, Aspose.Slides.Export.SaveFormat.Html, htmlOptions);
}
// load HTML to view the presentation content
System.Diagnostics.Process.Start(output);
 
  • About Aspose.Slides for .NET API

    Aspose.Slides API can be used to read, write, manipulate and convert Microsoft PowerPoint documents to PDF, XPS, HTML, TIFF, ODP and various other formats. One can create new files from scratch and save those in the relevant supported formats. Aspose.Slides is a standalone API for creating, parsing or manipulating presentations, slides and elements and it does not depend on any software like Microsoft or OpenOffice.

    Free App to View PPT

    Other Supported Viewer Formats

    Using C#, One can also view many other file formats including.

    ODP (OpenDocument Presentation Format)
    OTP (OpenDocument Standard Format)
    POT (Microsoft PowerPoint Template Files)
    POTM (Microsoft PowerPoint Template File)
    POTX (Microsoft PowerPoint Template Presentation)
    PPS (PowerPoint Slide Show)
    PPSM (Macro-enabled Slide Show)
    PPSX (PowerPoint Slide Show)
    PPTM (Macro-enabled Presentation File)
    PPTX (Open XML presentation Format)