Python PowerPoint API for Presentations
Create, read, modify, merge, clone, protect, and convert PowerPoint and OpenOffice presentations in Python without external software.
Download Free TrialAspose.Slides for Python via .NET is a presentation processing library that lets Python applications read, edit, manipulate, and convert PowerPoint and OpenOffice presentations without Microsoft PowerPoint or third-party software.
Ideal for server-side automation, batch processing, and desktop workflows, this cross-platform solution brings high-performance slide manipulation capabilities to the Python ecosystem.
Aspose.Slides for Python via .NET provides these popular features:
- Loading, opening, and viewing presentations.
- Editing presentations.
- Converting presentations to PDF, JPG, HTML, GIF, SVG, and many other formats.
- Rendering and printing presentations.
- Converting slides to high-quality video files with support for animations and transitions.
- Automatically translating presentations using AI-powered translation through external language model integration.
- Encrypting and decrypting presentations; password-protecting presentations and removing passwords.
- Manipulating presentation entities, such as master slides, shapes, charts, picture frames, audio frames, video frames, OLE, VBA macros, animations, etc.
Python is a very popular language that sees a lot of use in regular applications, web development, research and academic tasks, data analysis, etc. For this reason, the Aspose.Slides team is proud to offer Aspose.Slides for Python via .NET to the Python community.
Advanced Python PowerPoint API Features
Create or clone slides from templates
Work with PowerPoint tables via API
Apply or remove shape protection
Add Excel charts as OLE objects to slides
Support linked OLE objects
Generate presentations from a database
Protect presentations and generated PDFs
Print presentations on a physical printer
Create and customize charts
System Requirements
- Compatible with Python <3.14, >=3.5
- For Python development on Linux, see the additional Linux requirements.
How to Install
Use pip to install the Aspose.Slides Python library for presentation processing from the PyPI repository:
pip install aspose-slides
Create a New PowerPoint Presentation in Python
The following example adds a line shape to the first slide of a presentation.
import aspose.slides as slides
with slides.Presentation() as presentation:
slide = presentation.slides[0]
slide.shapes.add_auto_shape(slides.ShapeType.LINE, 50, 150, 300, 0)
presentation.save("presentation.pptx", slides.export.SaveFormat.PPTX)
Merge Presentations in Python
This Python code shows you how to merge presentations:
import aspose.slides as slides
with slides.Presentation("presentation1.pptx") as dst_presentation:
with slides.Presentation("presentation2.pptx") as src_presentation:
for slide in src_presentation.slides:
dst_presentation.slides.add_clone(slide)
dst_presentation.save("combined.pptx", slides.export.SaveFormat.PPTX)
Import a Presentation from PDF in Python
This Python code demonstrates the PDF to PowerPoint conversion process:
import aspose.slides as slides
with slides.Presentation() as presentation:
presentation.slides.remove_at(0)
presentation.slides.add_from_pdf("welcome_to_powerpoint.pdf")
presentation.save("OutputPresentation.pptx", slides.export.SaveFormat.PPTX)
Convert PowerPoint to PDF with Default Options in Python
This Python code shows how to convert a PowerPoint or OpenOffice presentation to PDF using the default options.
import aspose.slides as slides
with slides.Presentation("presentation.ppt") as presentation:
presentation.save("document.pdf", slides.export.SaveFormat.PDF)
Convert PowerPoint to JPG in Python
The following example shows you how to convert a PowerPoint PPT, PPTX, and OpenOffice ODP document into a set of JPEG images.
import aspose.slides as slides
with slides.Presentation("presentation.pptx") as presentation:
for slide in presentation.slides:
with slide.get_image(1, 1) as slide_image:
slide_image.save(f"slide_{slide.slide_number}.jpg", slides.ImageFormat.JPEG)
What People Are Saying
Don't just take our word for it. See what users have to say about PowerPoint APIs.
Support and Learning Resources
- Learning Resources
- Documentation
- Source Code
- API References
- Product Support
- Free Support
- Paid Support
- Blog
- Release Notes
- Why Aspose.Slides for Python via .NET?
- Customers List
- Success Stories