Standalone PowerPoint Compatible Python API for Efficient Presentation Handling
Product Page | Documentation | Examples | Forum | Temporary License | Customized Demo
Spire.Presentation for Python is a comprehensive PowerPoint compatible API designed for developers to efficiently create, modify, read, and convert PowerPoint files within Python programs. It offers a broad spectrum of functions to manipulate PowerPoint documents without any external dependencies.
Spire.Presentation for Python supports a wide range of PowerPoint features, such as adding and formatting text, tables, charts, images, shapes, and other objects, inserting and modifying animations, transitions, and slide layouts, generating and managing master slides, and many more.
This professional Python API also enables developers to easily convert PowerPoint files to various formats with high quality, including PDF, SVG, image, HTML, XPS, and more.
Support for Various PowerPoint Versions
- PPT - PowerPoint Presentation 97-2003
- PPS - PowerPoint SlideShow 97-2003
- PPTX - PowerPoint Presentation 2007/2010/2013/2016/2019
- PPSX - PowerPoint SlideShow 2007, 2010
High-Quality and Efficient PowerPoint File Conversion
Spire.Presentation for Python allows conversion from PowerPoint files to images, PDF, HTML, XPS, and SVG and interconversion between PowerPoint Presentation formats.
Support for Rich Presentation Manipulation Features
- Work with PowerPoint Charts
- Print PowerPoint Presentations
- Work with SmartArtImages and Shapes
- Audio and Video
- Protect Presentation Slides
- Text and Image Watermark
- Merge Split PowerPoint Document
- Comments and Notes
- Manage PowerPoint Tables
- Set Animations on Shapes
- Manage Hyperlink
- Extract Text and Image
- Replace Text
Examples
Create a PowerPoint document in Python
from spire.presentation.common import *
import math
from spire.presentation import *
outputFile ="HelloWorld.pptx"
#Create a PPT document
presentation = Presentation()
#Add a new shape to the PPT document
left = math.trunc(presentation.SlideSize.Size.Width / float(2))-250
rec = RectangleF.FromLTRB(left, 80, left+500, 150+80)
shape = presentation.Slides[0].Shapes.AppendShape(ShapeType.Rectangle, rec)
shape.ShapeStyle.LineColor.Color = Color.get_White()
shape.Fill.FillType = FillFormatType.none
#Add text to the shape
shape.AppendTextFrame("Hello World!")
#Set the font and fill style of the text
textRange = shape.TextFrame.TextRange
textRange.Fill.FillType = FillFormatType.Solid
textRange.Fill.SolidColor.Color = Color.get_CadetBlue()
textRange.FontHeight = 66
textRange.LatinFont = TextFont("Lucida Sans Unicode")
#Save the document
presentation.SaveToFile(outputFile, FileFormat.Pptx2010)
presentation.Dispose()
Convert PowerPoint files to PDF
from spire.presentation.common import *
from spire.presentation import *
inputFile ="./Data/ToPDF.pptx"
outputFile = "ToPDF.pdf"
#Create a PPT document
presentation = Presentation()
#Load PPT file from disk
presentation.LoadFromFile(inputFile)
#Save the PPT to PDF file format
presentation.SaveToFile(outputFile, FileFormat.PDF)
presentation.Dispose()
Convert PowerPoint files to Images
from spire.presentation.common import *
from spire.presentation import *
inputFile ="./Data/ToImage.pptx"
#Create PPT document
presentation = Presentation()
#Load PPT file from disk
presentation.LoadFromFile(inputFile)
#Save PPT document to images
for i, slide in enumerate(presentation.Slides):
fileName ="ToImage_img_"+str(i)+".png"
image = slide.SaveAsImage()
image.Save(fileName)
image.Dispose()
presentation.Dispose()
Set passwords for PowerPoint presentations
from spire.presentation import *
inputFile = "./Data/Encrypt.pptx"
outputFile = "Encrypt_out.pptx"
#Create a PPT document
presentation = Presentation()
#Load the document from disk
presentation.LoadFromFile(inputFile)
#Get the password that the user entered
password = "e-iceblue"
#Encrypy the document with the password
presentation.Encrypt(password)
#Save the document
presentation.SaveToFile(outputFile, FileFormat.Pptx2010)
presentation.Dispose()
Product Page | Documentation | Examples | Forum | Temporary License | Customized Demo
Metadata
Release files for spire-presentation 8.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spire.presentation-8.8.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for spire.presentation-8.8.2-py3-none-win_amd64.whl |
| spire.presentation-8.8.2-py3-none-manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details for spire.presentation-8.8.2-py3-none-manylinux1_x86_64.whl |
Total release size: 68.8 MB
Release files / spire.presentation-8.8.2-py3-none-win_amd64.whl
| Download URL | spire.presentation-8.8.2-py3-none-win_amd64.whl |
|---|---|
| Size | 28.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0f51fd47e7d0d7307dace2b8aaefea8e0f56a7228fb362781268a6817863e8b2
|
|
BLAKE2b-256 checksum How to use checksums |
3b7199af583ec890dac70668df7a012d4c4abe92dd9d1c45ef0ddbfc01363313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / spire.presentation-8.8.2-py3-none-manylinux1_x86_64.whl
| Download URL | spire.presentation-8.8.2-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 40.3 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
6d1674ed1577c0e8674c5cb113ef5375b4edd47ab2bf4e169a00e94b170d62bc
|
|
BLAKE2b-256 checksum How to use checksums |
cf7a004cec7588cd915d69bcda58ec65cb5b87a85a64653484a554568186197a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for spire-presentation 8.8.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.