Aspose.Slides for Python via .NET
Aspose.Slides for Python via .NET is a Python library for creating, reading, editing and converting PowerPoint and OpenDocument presentations, without Microsoft PowerPoint or Microsoft Office.
It loads and saves PPT, PPTX, PPS, POT and ODP, including macro-enabled and template variants, and exports to PDF, XPS, HTML, SVG, TIFF, Markdown and images.
Get Started
GETTING STARTED
EVALUATE
Build with Slides
COMMON TASKS
SLIDES WORKFLOWS
EXAMPLES
Reference & Support
REFERENCE
SUPPORT
Your first presentation
Install the package from PyPI:
pip install aspose.slides
The package includes the .NET runtime it uses, so you do not need to install .NET. On Linux, also install the libgdiplus and ICU libraries, and with the system Python of Debian or Ubuntu, run the command in a virtual environment. macOS has further prerequisites, and we have not verified the installation there. See Installation for the commands, the macOS prerequisites, and the supported Python versions.
Save this code as hello.py:
import aspose.slides as slides
# Instantiate the Presentation class that represents a presentation file.
with slides.Presentation() as presentation:
# Get the first slide.
slide = presentation.slides[0]
# Add an auto-shape of type CLOUD.
auto_shape = slide.shapes.add_auto_shape(slides.ShapeType.CLOUD, 20, 20, 200, 80)
auto_shape.text_frame.text = "Hello, Aspose!"
# Save the presentation as a PPTX file.
presentation.save("new_presentation.pptx", slides.export.SaveFormat.PPTX)
Run it with python hello.py. The script saves new_presentation.pptx in the current folder, with one slide holding a cloud shape that reads “Hello, Aspose!”. Without a license, the saved file carries an evaluation watermark — see Licensing. For more ways to create and fill a presentation, see Create Presentations.