Skip to content

Instantly share code, notes, and snippets.

@conholdate-gists
Created March 14, 2024 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conholdate-gists/42053341d0435ffe3ce5cc84bc21fa50 to your computer and use it in GitHub Desktop.
Save conholdate-gists/42053341d0435ffe3ce5cc84bc21fa50 to your computer and use it in GitHub Desktop.
Convert HTML to PPTX Presentation Slides in Java
// 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