Convert Powerpoint PPT and PPTX to HTML

Contents
[ ]

About PowerPoint to HTML Conversion

Aspose.Slides for .NET provides support for converting a PowerPoint presentation to HTML. With Aspose.Slides API you may set up the conversion process to enhance the resulting HTML. Both PPT to HTML and PPTX to HTML conversions are available.

There are many ways to convert PPT(X) to HTML. You could use PowerPoint native tools or online web tools to do that, however, they will cover only the basic scenarios to convert PPT(X) to HTML. If you need to built-in an HTML result to your website or integrate it into an enterprise-level solution - you would rather need to have more flexibility in PPT(X) to HTML conversion.

With Aspose.Slides API you may set up the conversion process to enhance the resulting HTML. It is possible to create your own PPT to HTML or PPTX to HTML converter, and integrate it into any desktop or web software.

Here are just some possibilities to set up PPT(X) to HTML conversion with Aspose.Slides:

  1. Convert the whole PowerPoint presentation to HTML.
  2. Convert a separate presentation slide to HTML. Choose separate slides from different presentations, combine them on the fly and convert presentation slides to one HTML file.
  3. Convert presentation media (images, video, etc) to HTML.
  4. Convert PowerPoint presentation to a responsive HTML. It’s a powerful feature to create a responsive HTML document from the presentation, when you need the resulting HTML to be properly shown on various devices and sizes. You do not need to define all the responsive styles, the API will do that instead of you.
  5. Convert PPT(X) to HTML with included or excluded speaker notes. It’s possible to set the position of the notes.
  6. Convert PPT(X) to HTML with included or excluded comments. It’s possible to set the position of the comments, area color and width.
  7. Convert PPT(X) to HTML with its original or embedded fonts. You can upload the original or embedded fonts used in presentation to make it applied in the resulting HTML.
  8. Use new CSS while converting PPT(X) to HTML. You can change the styles of the resulting HTML by applying new CSS styles while converting presentation.

In Aspose.Slides PowerPoint to HTML conversion is implemented with Save method exposed by the Presentation class. Conversion settings are not limited with the described above and are represented in HtmlOptions class.

Convert Powerpoint to HTML

Convert PPT or PPTX presentation to HTML file using Aspose.Slides. For that, save a PowerPoint presentation to HTML in two-lines:

  1. Create an instance of Presentation class.
  2. Call Save method from it specifying the resulting file as an HTML file:

Convert Powerpoint to Responsive HTML

Convert PPT(X) presentation to Responsive HTML, which will ensure the generated HTML will be displayed properly across all browsers and devices. ResponsiveHtmlController class provides the possibility to generate responsive HTML files. This controller can be used in the same manner as other HTML controllers:

Convert Powerpoint to HTML with Notes

The following example shows how to convert PPT(X) presentation to HTML with the rendered speaker notes. Using the options of HtmlOptions class and INotesCommentsLayoutingOptions interface you can render speaker notes to HTML:

Convert Powerpoint to HTML with Original Fonts

Preserve original fonts that are used in presentation while converting PPT(X) to HTML. EmbedAllFontsHtmlController class preserves the original fonts in generated HTML:

Convert Slide to HTML

Convert a separate presentation slide to HTML. Fo that use the same Save method exposed by the Presentation class that is used to convert the whole PPT(X) presentation into a HTML document. The HtmlOptions class can be also used to set the additional conversion options:

Save CSS and Images when Exporting To HTML

Use new CSS styles file to change the resulting styles of the HTML file while PPT(X) to HTML conversion with Aspose.Slides. Please review the example below how to use overridable methods to create a custom HTML document with a link to CSS file:

Embed All Fonts When Converting Presentation to HTML

Convert PPT(X) presentation to HTML with all its embedded fonts. EmbedAllFontsHtmlController class is used to embed all presentation fonts into HTML document. EmbedAllFontsHtmlController has a parameterized constructor where an array of font names can be passed to prevent them from embedding. Some fonts, like Calibri or Arial, used in the presentation are not needed to be embedded (which leads the resulting HTML document to become larger) because almost every system already has them installed. The EmbedAllFontsHtmlController also supports inheritance and WriteFont method that is intended to be overridden:

Support of SVG Responsive Property

The code sample below shows how to export a PPT(X) presentation to HTML with the responsive layout:

Exporting Media Files to HTML file

In order to export media files from PPT(X) presentation to HTML. Please follow the steps below:

  1. Create an instance of Presentation class.
  2. Get reference of the slide.
  3. Setting the transition effect.
  4. Write the presentation as a PPTX file.

In the example given below, we have exported the media files to HTML.