# Aspose.Slides for Python: PowerPoint API for PPTX and PPT

> Python library for creating, editing, converting, and processing presentations in formats such as PPT, PPTX, PPS, POT, PPSX, PPTM, PPSM, POTX, POTM, and ODP, with support for PDF output.

Source: https://products.aspose.com/slides/python-net/
Updated: 2026-07-31



<p><strong>Aspose.Slides for Python via .NET</strong> is a presentation processing library that lets Python applications read, edit, manipulate, and convert PowerPoint and OpenDocument presentations without requiring Microsoft PowerPoint for core presentation processing. Optional workflows such as video encoding and AI-powered translation use external tools or services.</p>

<p>The library is suitable for server-side automation, batch processing, and desktop workflows on Windows, Linux, and macOS.</p>

<p><strong>Aspose.Slides for Python via .NET</strong> provides these popular features:</p>
<ul>
    <li>Loading, opening, and viewing presentations.</li>
    <li>Editing presentations.</li>
    <li>Converting presentations to PDF, JPG, HTML, GIF, SVG, and many other formats.</li>
    <li>Rendering and printing presentations.</li>
    <li>Generating slide frames and timing data for videos with animations and transitions; encoding the frames into a video file requires an external tool such as FFmpeg.</li>
    <li>Automatically translating presentations using AI-powered translation through external language model integration.</li>
    <li>Encrypting and decrypting presentations; password-protecting presentations and removing passwords.</li>
    <li>Manipulating presentation elements such as master slides, shapes, charts, picture frames, audio frames, video frames, OLE objects, VBA macros, and animations.</li>
</ul>

<p>Python developers can use <strong>Aspose.Slides for Python via .NET</strong> in web applications, desktop software, data-processing pipelines, and research or academic projects.</p>

<div class="diagram1 d1-python">
 <div class="d1-row">
  <div class="d1-col d1-left">
   <header>
    <i class="fa fa-table">
    </i>
    Data Processing
   </header>
   <ul>
    <li>
     Manage Charts
    </li>
    <li>
     Manage SmartArt
    </li>
    <li>
     Manage PowerPoint Shapes
    </li>
    <li>
     Manage ActiveX Controls
    </li>
    <li>
     Manage OLE objects
    </li>
   </ul>
   <header>
    <i class="fa fa-text-width">
    </i>
    Text and Paragraph
   </header>
   <ul>
    <li>
     Manage text and formatting
    </li>
    <li>
     Manipulate Hyperlink Text
    </li>
    <li>
     Set Placeholder Type
    </li>
   </ul>
  </div>

  <div class="d1-col d1-right">
   <header>
    <i class="fa fa-cog">
    </i>
    Graphics and Multimedia
   </header>
   <ul>
    <li>
     Manage Slide Transitions
    </li>
    <li>
     Manage Animation Effects
    </li>
    <li>
     Add Connectors to Shapes
    </li>
    <li>
     Rotate and flip shapes
    </li>
    <li>
     Manage Shape's Line Styles
    </li>
   </ul>
  </div>

 </div>

 <div class="d1-logo">
  <img width="70" height="75" alt="Python PowerPoint Processing APIs" src="https://www.aspose.cloud/templates/aspose/img/products/slides/aspose_slides-for-python.svg"/>
  <header>
   Aspose.Slides
  </header>
  <footer>
   <small>
    <em>
     for
    </em>
   </small>
   Python
   <em>via .NET</em>
  </footer>
 </div>

</div>

<div class="diagram1 d1-python">
 <div class="d1-row">
  <div class="d1-col d1-left">
   <header>
    <i class="fa fa-cubes">
    </i>
    Windows (32-bit and 64-bit)
   </header>
   <ul>
    <li>
     Windows 7
    </li>
    <li>
     Windows 8 and 8.1
    </li>
    <li>
     Windows 10
    </li>
    <li>
     Windows 11
    </li>
   </ul>
  </div>

  <div class="d1-col d1-right">
   <header>
    <i class="fa fa-cubes">
    </i>
    Linux and macOS
   </header>
   <ul>
    <li>
     Ubuntu
    </li>
    <li>
     OpenSUSE
    </li>
    <li>
     CentOS
    </li>
    <li>
     macOS
    </li>
   </ul>
  </div>

 </div>

 <div class="d1-logo">
  <img width="70" height="75" alt="Presentation APIs for Python" src="https://www.aspose.cloud/templates/aspose/img/products/slides/aspose_slides-for-python.svg"/>
  <header>
   Aspose.Slides
  </header>
  <footer>
   <small>
    <em>
     for
    </em>
   </small>
   Python
   <em>via .NET</em>
  </footer>
 </div>

</div>

<div class="diagram1 d2 d1-python">
 <div class="d1-row">
  <div class="d1-col d1-left">
   <header>
    <i class="fa fa-arrows-v">
    </i>
    Input/Output
   </header>
   <ul>
    <li>
     <b>
      Microsoft PowerPoint:
     </b>
     PPT, PPTX, PPS, POT, PPSX, PPTM, PPSM, POTX, POTM
    </li>
    <li>
     <b>
      OpenDocument:
     </b>
     ODP
    </li>
    <li>
     <b>
      Fixed Layout:
     </b>
     PDF
    </li>
   </ul>
  </div>

  <div class="d1-col d1-right">
   <header>
    <i class="fa fa-mail-forward">
    </i>
    Output Only
   </header>
   <ul>
    <li>
     <b>
      Fixed Layout:
     </b>
     PDF/A, XPS
    </li>
    <li>
     <b>
      Images:
     </b>
     JPEG, PNG, BMP, TIFF, GIF
    </li>
    <li>
     SVG
    </li>
    <li>
     <b>
      Web:
     </b>
     HTML
    </li>
   </ul>
  </div>

 </div>

 <div class="d1-logo">
  <img width="70" height="75" alt="PowerPoint Presentation API" src="https://www.aspose.cloud/templates/aspose/img/products/slides/aspose_slides-for-python.svg"/>
  <header>
   Aspose.Slides
  </header>
  <footer>
   <small>
    <em>
     for
    </em>
   </small>
   Python
   <em>via .NET</em>
  </footer>
 </div>

</div>

<div class="container-fluid features-section bg-gray singleproduct">
 <a class="anchor" id="features" name="features">
 </a>
 <div class="row">
  <div class="container">
   <h2 class="pr-ft">
    Advanced Python PowerPoint API Features
   </h2>
   <p>
   </p>
   <div class="col-lg-4">
    <em class="fa fa-copy ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Create or clone slides from templates
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-table ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Work with PowerPoint tables via API
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-shield ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Apply or remove shape protection
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-bar-chart ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Add Excel charts as OLE objects to slides
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-link ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Support linked OLE objects
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-database ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Generate presentations from a database
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-lock ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Protect presentations and generated PDFs
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-print ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Print presentations on a physical printer
    </p>
   </div>
   <div class="col-lg-4">
    <em class="fa fa-pie-chart ico-blue fa-2x col-lg-2">
    </em>
    <p class="col-lg-10">
     Create and customize charts
    </p>
   </div>
   <div class="col-lg-12">
    <h2 class="h2title">
     System Requirements
    </h2>
    <ul>
      <li>Compatible with Python 3.5 or later</li>
      <li>For Python development on Linux, see the <a href="https://docs.aspose.com/slides/python-net/system-requirements/">additional Linux requirements</a>.</li>
    </ul>
   </div>
   <div class="col-lg-12">
    <h2 class="h2title">
     How to Install
    </h2>
     <p>Use <code>pip</code> to install the Aspose.Slides Python library for presentation processing from the <a href="https://pypi.org/project/aspose-slides/">PyPI repository</a>:</p>
    <pre>pip install aspose-slides</pre>
   </div>
    <div class="col-lg-12">
        <h2 class="h2title">Create a New PowerPoint Presentation in Python</h2>
        <p>The following example adds a line shape to the first slide of a presentation.</p>
        <pre>
            <code class="python">
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)
            </code>
        </pre>
    </div>
    <div class="col-lg-12">
        <h2 class="h2title">Merge Presentations in Python</h2>
        <p>This Python code shows you how to merge presentations:</p>
        <pre>
            <code class="python">
with slides.Presentation("presentation1.pptx") as destination_presentation:
    with slides.Presentation("presentation2.pptx") as source_presentation:
        for slide in source_presentation.slides:
            destination_presentation.slides.add_clone(slide)
        destination_presentation.save("combined.pptx", slides.export.SaveFormat.PPTX)
            </code>
        </pre>
    </div>
    <div class="col-lg-12">
        <h2 class="h2title">Import a Presentation from PDF in Python</h2>
        <p>This Python code demonstrates the PDF to PowerPoint conversion process:</p>
        <pre>
            <code class="python">
with slides.Presentation() as presentation:
    presentation.slides.remove_at(0)
    presentation.slides.add_from_pdf("welcome_to_powerpoint.pdf")
    presentation.save("output_presentation.pptx", slides.export.SaveFormat.PPTX)
            </code>
        </pre>
    </div>
    <div class="col-lg-12">
        <h2 class="h2title">Convert PowerPoint to PDF with Default Options in Python</h2>
        <p>This Python code shows how to convert a PowerPoint or OpenDocument presentation to PDF using the default options.</p>
        <pre>
            <code class="python">
with slides.Presentation("presentation.ppt") as presentation:
    presentation.save("document.pdf", slides.export.SaveFormat.PDF)
            </code>
        </pre>
    </div>
    <div class="col-lg-12">
        <h2 class="h2title">Convert PowerPoint to JPG in Python</h2>
        <p>The following example shows you how to convert a PPT, PPTX, or OpenDocument Presentation (ODP) file into a set of JPEG images.</p>
        <pre>
            <code class="python">
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)
            </code>
        </pre>
    </div>
  </div>
 </div>
</div>

## FAQ

### How do I install Aspose.Slides for Python via .NET?

`pip install aspose-slides` from PyPI. There is no separate runtime to install — the .NET components the library needs ship inside the wheel.

### Which Python versions does it support, and does it work on Linux?

Python 3.5 and later, on Windows, Linux and macOS. Linux has a small set of extra system requirements, listed in the installation documentation.

### How does it compare with python-pptx?

python-pptx reads and writes PPTX and is free and MIT-licensed; it does not render. Aspose.Slides adds PDF and image export, legacy `.ppt` and ODP support, animations and encryption. The [tested comparison](/slides/python-net/python-pptx-comparison/) runs both libraries and records what each one did.

### Do I need Microsoft PowerPoint installed?

No. The library parses and writes the file formats itself, so it runs in containers, on CI workers and on Linux servers with no Office present.

### What does the library do if no licence is applied?

It runs, but every export is stamped with an *Evaluation only* notice and a line naming the product and version. Setting a licence at start-up removes the stamp.

> We have found Aspose.Slides to be easy to use and to work nicely on our servers. We have found they fill an important need for dynamically generating files to expand our reach beyond the traditional web application.
>
> — Rick Joi | Workplace Dynamics, UK

> The product worked as advertised, the documentation was easy to follow, and the support forums were all the help we needed. The final solution that we deployed has exceeded our initial expectations by a great deal.
>
> — Bruce Brien | Stratascope Inc, USA
