Convert HTML to PPTX in Java
Convert HTML files to PPTX presentations using Aspose.Slides for Java without Microsoft PowerPoint.
Convert HTML to PPTX using Aspose.Slides
Aspose.Slides for Java
is a presentation processing API that can import HTML content and save it as a PowerPoint presentation.
Convert HTML to PPTX in Java
Using
Aspose.Slides for Java
, you can convert an HTML file to a PPTX presentation with just a few lines of code:
Java code for converting HTML to PPTX
Presentation presentation = new Presentation();
try {
presentation.getSlides().removeAt(0);
try (FileInputStream htmlStream = new FileInputStream("page.html")) {
presentation.getSlides().addFromHtml(htmlStream);
}
presentation.save("presentation.pptx", SaveFormat.Pptx);
} finally {
presentation.dispose();
}
How to convert HTML to PPTX 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 toPPTX.Save the resulting file as a
PPTXpresentation.
Free Online Converter
Convert presentations and slides online.
Other Supported PowerPoint Conversions
You can also convert files in other formats to PowerPoint.