Convert PowerPoint to HTML Using Java

This article will share how to convert PowerPoint documents to HTML format files using Free Spire.Presentation for Java.

Installation(2 Methods)
● Download the free API and unzip it. Then add the Spire.Presentation.jar file to your project as dependency.

● You can also add the jar dependency to your maven project by adding the following configurations to the pom.xml.


Below is a screenshot of the sample PowerPoint document.

Sample Code

import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;

public class ToHtml {
public static void main(String[] args) throws Exception {

//Create a Presentation object
Presentation presentation = new Presentation();

//Load the sample document

//Save the document to HTML format
presentation.saveToFile("C:\\Users\\Administrator\\Desktop\\ToHtml.html", FileFormat.HTML);