# Render PowerPoint presentations as HTML, PDF, and image files Convert PowerPoint presentations to HTML, PDF, PNG, or JPEG using the GroupDocs.Viewer Python API. [GroupDocs.Viewer for Python](https://products.groupdocs.com/viewer/python-net) allows you to render your presentations in HTML, PDF, PNG, and JPEG formats. You do not need to use Microsoft PowerPoint or other software to load and view presentations within your Python application (web or desktop). Create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) class instance to get started with the GroupDocs.Viewer API. Pass a presentation you want to view to the class constructor. You can load the presentation from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the presentation to HTML, PDF, or image format. These methods allow you to render the entire presentation or specific slides. {{< button style="primary" link="https://products.groupdocs.app/viewer/powerpoint" >}} {{< icon "gdoc_person" >}} View PowerPoint files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} ## Supported Presentation file formats GroupDocs.Viewer supports the following file formats: * {{% closedlink title="Microsoft PowerPoint Presentation" href="https://docs.fileformat.com/presentation/pptx/" %}} (.PPTX) * {{% closedlink title="Microsoft PowerPoint 97-2003 Presentation" href="https://docs.fileformat.com/presentation/ppt/" %}} (.PPT) * {{% closedlink title="Microsoft PowerPoint Template" href="https://docs.fileformat.com/presentation/potx" %}} (.POTX) * {{% closedlink title="Microsoft PowerPoint 97-2003 Template" href="https://docs.fileformat.com/presentation/pot" %}} (.POT) * {{% closedlink title="Microsoft PowerPoint Macro-Enabled Template" href="https://docs.fileformat.com/presentation/potm" %}} (.POTM) * {{% closedlink title="Microsoft PowerPoint Slide Show" href="https://docs.fileformat.com/presentation/ppsx" %}} (.PPSX) * {{% closedlink title="Microsoft PowerPoint Macro-Enabled Slide Show" href="https://docs.fileformat.com/presentation/ppsm" %}} (.PPSM) * {{% closedlink title="Microsoft PowerPoint 97-2003 Slide Show" href="https://docs.fileformat.com/presentation/pps" %}} (.PPS) * {{% closedlink title="Microsoft PowerPoint Macro-Enabled Presentation" href="https://docs.fileformat.com/presentation/pptmx" %}} (.PPTM) * {{% closedlink title="OpenDocument Presentation" href="https://docs.fileformat.com/presentation/odp" %}} (.ODP) * {{% closedlink title="OpenDocument Presentation Template" href="https://docs.fileformat.com/presentation/otp" %}} (.OTP) * {{% closedlink title="OpenDocument Flat XML Presentation" href="https://docs.fileformat.com/" %}} (.FODP) ## Render presentations as HTML Create an [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a presentation file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} ```python from groupdocs.viewer import Viewer from groupdocs.viewer.options import HtmlViewOptions def render_presentation_to_html(): # Load presentation with Viewer("sample.pptx") as viewer: # Create an HTML file for each slide. # {0} is replaced with the current page number in the file name. options = HtmlViewOptions.for_embedded_resources("render_presentation_to_html/pdf_page_{0}.html") viewer.view(options) if __name__ == "__main__": render_presentation_to_html() ``` {{< /tab >}} {{< tab "sample.pptx" >}} {{< tab-text >}} `sample.pptx` is the sample file used in this example. Click [here](https://docs.groupdocs.com/viewer/python-net/_sample_files/rendering-basics/render-presentations/sample.pptx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "pdf_page_1.html" >}} ```text