Learn how to convert PowerPoint PPT or PPTX to HTML in Python: https://blog.aspose.com/2021/12/16/convert-ppt-to-html-in-python/
Last active
December 30, 2021 07:20
-
-
Save aspose-com-gists/223609d1fb2c102aac36f1c4707834bb to your computer and use it in GitHub Desktop.
Convert PowerPoint PPT or PPTX to HTML in Python
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
import aspose.slides as slides | |
# Load the presentation file | |
pres = slides.Presentation("presentation.pptx") | |
# Create HTML options | |
options = slides.export.HtmlOptions() | |
# Include slide notes | |
options.notes_comments_layouting.notes_position = slides.export.NotesPositions.BOTTOM_FULL | |
# Save as HTML | |
pres.save("ppt-to-html-notes.html", slides.export.SaveFormat.HTML, options) |
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
import aspose.slides as slides | |
# Load the presentation file | |
pres = slides.Presentation("presentation.pptx") | |
# Save as HTML | |
pres.save("ppt-to-html.html", slides.export.SaveFormat.HTML) |
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
import aspose.slides as slides | |
# Load the presentation file | |
pres = slides.Presentation("presentation.pptx") | |
# Create HTML options | |
options = slides.export.HtmlOptions() | |
# Create a responsive HTML controller | |
controller = slides.export.ResponsiveHtmlController() | |
# Set controller as HTML formatter | |
options.html_formatter = slides.export.HtmlFormatter.create_custom_formatter(controller) | |
# Save as HTML | |
pres.save("ppt-to-responsive-html.html", slides.export.SaveFormat.HTML, options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment