Convert HTML to PPT in Java
Convert HTML files to PPT presentations using Aspose.Slides for Java without Microsoft PowerPoint.
Convert HTML to PPT in Java
Using
Aspose.Slides for Java
, you can convert an HTML file to a PPT presentation with just a few lines of code:
Java code for converting HTML to PPT
Presentation presentation = new Presentation();
try {
presentation.getSlides().removeAt(0);
try (FileInputStream htmlStream = new FileInputStream("page.html")) {
presentation.getSlides().addFromHtml(htmlStream);
}
presentation.save("presentation.ppt", SaveFormat.Ppt);
} finally {
presentation.dispose();
}Convert HTML to PPT using Aspose.Slides
Aspose.Slides for Java
is a presentation processing API that can import HTML content and save it as a PowerPoint presentation.
How to convert HTML to PPT in Java
- Install Aspose.Slides for Java. See Installation.
- Add the library as a reference in your project.
- Create an instance of the
Presentationclass. - Load the
HTMLfile you want to convert toPPT. - Save the resulting file as a
PPTpresentation.
Built with Aspose.Slides
Convert HTML to PPT Online
The free Aspose.Slides Conversion app is built with Aspose.Slides for Java, the same API as the code above. Open it and see what the API can do with your own HTML files.
- Runs in your browser, nothing to install.
- See how Aspose.Slides converts files before you write code.
- Upload HTML files and save them as PPT.
- Download the result or convert more files.
Other Supported PowerPoint Conversions
You can also convert files in other formats to PowerPoint.