Convert Presentation to Webpage HTML Programmatically using C++

Convert PPT PPTX to HTML

Presentations (PPTX/PPT) are frequently used to depict the information to a large number of audiences. In this article, we will be discussing how to convert PowerPoint Presentation to HTML. This use case can be helpful when the information is to be presented in a web application, website, etc. There are different variations of Presentation to HTML conversion some of which we will be covering here briefly:

Presentation to HTML Converter API – Installation

This feature is a competitive edge for Aspose.Slides for C++ API as it is not available even in Microsoft PowerPoint Application. Moreover, the output files are generated with great fidelity as the content appears the same as the input file. Let us install Aspose.Slides for C++ API to proceed with conversion demonstrations. You can easily download the API from the Downloads section, or from the NuGet gallery as explained in the screenshot below:

Presentation to HTML

Once the API has been perfectly configured, we are all good to explore the Presentation to HTML conversion.

Convert Whole Presentation (PPTX/PPT) to HTML using C++

Let us discuss the most frequently used and important use case where you need to convert a complete PowerPoint Presentation (PPTX/PPT) to HTML file format. The output HTML file will contain the contents from all slides in the source PPTX file. You need to follow the following steps for the conversion.

  1. Load input PPTX file as a presentation
  2. Initialize HtmlSaveOptions class object
  3. Save output HTML webpage

The code below shows how to convert a PowerPoint Presentation to HTML using C++.

Export Specific Slide of Presentation (PPTX/PPT) as HTML using C++

Some slides in a huge PowerPoint Presentation may contain specific information. For example, like you need some information from a chart on a specific slide then you can convert or export that slide to HTML. Following are the steps to achieve these requirements:

  1. Instantiate Presentation class object
  2. Specify HtmlOptions for the conversion
  3. Save the converted HTML file

The code snippet below shows how to convert a specific slide to HTML using C++:

Convert Each Slide of Presentation (PPTX/PPT) to Separate HTML File using C++

You can follow the steps below for converting each slide of a presentation to an individual or separate HTML file.

  1. Load PPT/PPTX file using Presentation class
  2. Iterate through each slide and save it as HTML

Below is a code snippet which shows how to convert all slides of a Presentation file as separate and individual HTML files:

Conclusion

We have learned how to export or convert Microsoft PowerPoint Presentations to HTML format using C++. Different variations and possibilities of this use case including the conversion of all slides and specific slides have been covered with examples. However, if you still want to discuss any concern then please feel free to write us at Free Support Forums.

See Also

Convert PowerPoint PPT or PPTX to PDF using C#