Converting Presentation to HTML in Python
Contents
[
Hide
]
PowerPoint Presentations in Python - Converting To HTML
To convert PowerPoint Presentation (PPT or PPTX) to HTML in Python, please use Aspose.Slides Java for Python with the following example code.
Python Code
# Instantiate a Presentation object that represents a PPTX file
pres=self.Presentation
pres = pres(self.dataDir + "Aspose.pptx")
html_opt = self.HtmlOptions()
html_formatter = self.HtmlFormatter
html_opt.setHtmlFormatter(html_formatter.createDocumentFormatter("",False))
\# Saving the presentation to HTML format
save_format = self.SaveFormat
pres.save(self.dataDir + "Aspose.html", save_format.Html, html_opt)
print "Document has been converted, please check the output file."
Download Running Code
Download Converting To Html (Aspose.Slides) from any of the below mentioned social coding sites: