Aspose.Slides  for Python via .NET

Python PowerPoint API for Presentations. Python PPTX, PPT

Create, read, write, modify, merge, clone, protect & convert PowerPoint and OpenOffice presentations in Python without any external software.

  Download Free Trial
  
 

Aspose.Slides for Python via .NET is a powerful class library for working with or processing presentations. Using this product, applications and developers get to read, edit or manipulate, and convert PowerPoint presentations (PPT, PPTX) and presentations in other formats (ODP) without third-party applications or dependencies.

Aspose.Slides for Python via. NET provides these popular features:

  • Loading, opening, and viewing presentations.
  • Editing presentations.
  • Converting presentations to PDF, Word, JPG, HTML, GIF, SVG, and many other formats.
  • Rendering and printing presentations.
  • 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.
  • And many more features.

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 the protection on shapes

Add Excel charts as OleObjects to slides

Support for Linked OleObjects

Generate presentations from database

Protect presentations & resultant PDF

Print presentations on a physical printer

Create & customize charts

System Requirements

How to Install

Use pip to install our Python library for Presentation processing from the PyPI repository

:
pip install aspose.slides

Create New PowerPoint Presentation. Python PPTX, PPT, or ODP

In the example given below, we have added a line to the first slide of the presentation.

            
import aspose.slides as slides

# Instantiate a Presentation object that represents a presentation file
with slides.Presentation() as presentation:
    slide = presentation.slides[0]
    slide.shapes.add_auto_shape(slides.ShapeType.LINE, 50, 150, 300, 0)
    presentation.save("NewPresentation_out.pptx", slides.export.SaveFormat.PPTX)
            
        

Merge Presentations: Python PPTX, PPT, or ODP

This Python code shows you how to merge presentations:

            
import aspose.slides as slides

with slides.Presentation("Presentation1.pptx") as pres1:
    with slides.Presentation("Presentation2.pptx") as pres2:
        for slide in pres2.slides:
            pres1.slides.add_clone(slide)
        pres1.save("combined.pptx", slides.export.SaveFormat.PPTX)
            
        

Import Presentation From PDF: Python PPTX, PPT, or ODP

This Python code demonstrates the PDF to PowerPoint conversion process:

            
import aspose.slides as slides

with slides.Presentation() as pres:
    pres.slides.remove_at(0)
    pres.slides.add_from_pdf("welcome-to-powerpoint.pdf")
    pres.save("OutputPresentation.pptx", slides.export.SaveFormat.PPTX)
            
        

Convert PowerPoint to PDF with Default Options: Python PPTX, PPT, or ODP to PDF

This python code shows you how to convert a PowerPoint PPT, PPTX, and OpenOffice ODP document to a PDF document using the default options. The resulting file is a PDF document at the maximum quality levels

            
import aspose.slides as slides

# Instantiate a Presentation object that represents a PPT file
presentation = slides.Presentation("PowerPoint.ppt")

# Save the presentation as PDF
presentation.save("PPT-to-PDF.pdf", slides.export.SaveFormat.PDF)
            
        

Convert PowerPoint to JPG: Python PPTX, PPT, or ODP to JPEG

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
import aspose.pydrawing as drawing

pres = slides.Presentation("pres.pptx")

for sld in pres.slides:
    bmp = sld.get_thumbnail(1, 1)
    bmp.save("Slide_{num}.jpg".format(num=str(sld.slide_number)), drawing.imaging.ImageFormat.jpeg)
            
        

What People Are Saying

Don't just take our word for it. See what users have to say about PowerPoint APIs.

 
 
View Case Studies
  

Support and Learning Resources