Created
March 14, 2024 12:31
-
-
Save conholdate-gists/42053341d0435ffe3ce5cc84bc21fa50 to your computer and use it in GitHub Desktop.
Convert HTML to PPTX Presentation Slides in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize an HTML document from the file | |
var document = new com.aspose.html.HTMLDocument("spring.html"); | |
// Initialize PdfSaveOptions | |
var options = new com.aspose.html.saving.PdfSaveOptions(); | |
// Convert HTML to PDF | |
com.aspose.html.converters.Converter.convertHTML(document, options, "spring-output.pdf"); | |
// Load PDF document | |
com.aspose.pdf.Document doc = new com.aspose.pdf.Document("spring-output.pdf"); | |
// Instantiate PptxSaveOptions instance | |
com.aspose.pdf.PptxSaveOptions pptx_save = new com.aspose.pdf.PptxSaveOptions(); | |
// Save the output in PPTX format | |
doc.save("PDFToPPTX.pptx", pptx_save); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment