WolfPPT - python-pptx limitations and alternative
python-pptx limitations, and an alternative for editing existing PowerPoint decks
python-pptx is good at building new decks from code. Its limits show up in production: it cannot render a slide to PDF or an image, has no API to copy a slide from one deck into another, reads and writes only .pptx, and can rewrite far more of the file than you changed. WolfPPT is the alternative for decks your team already maintains. Its free MIT package offers the same Presentation, slides, shapes, text_frame, and runs names and saves a copy where every part you did not edit keeps its original bytes, and WolfPPT Commercial adds rendering, deck assembly, and .ppt and .odp files.
python-pptx limitations, and what covers each
- No rendering. python-pptx writes XML and never lays out a slide, so PDF or thumbnail output usually means a LibreOffice install. WolfPPT Commercial renders with its own engine: see convert PPTX to PDF on Linux.
- No slide copy between decks. Copying shape XML by hand loses the slide's layout, master, theme fonts, charts, and media links. WolfPPT Commercial imports whole slides: see copy slides between decks.
- .pptx only. Legacy binary .ppt and OpenDocument .odp files need another tool. WolfPPT Commercial reads and writes both.
- Edits can spread. Some python-pptx calls rewrite more than the value you changed; the chart example below shows one. The free WolfPPT package rewrites only the parts that hold your edits.
The same edit script with one import changed
import zipfile
from wolfppt import Presentation # was: from pptx import Presentation
prs = Presentation("monthly_review.pptx")
for slide in prs.slides:
for shape in slide.shapes:
if not shape.has_text_frame:
continue
for paragraph in shape.text_frame.paragraphs:
for run in paragraph.runs:
if "{{month}}" in run.text:
run.text = run.text.replace("{{month}}", "September")
table = next(s for s in prs.slides[1].shapes if s.has_table).table
table.cell(1, 1).text = "$4.2M"
prs.save("monthly_review_updated.pptx")
with zipfile.ZipFile("monthly_review.pptx") as before, zipfile.ZipFile("monthly_review_updated.pptx") as after:
assert before.namelist() == after.namelist()
print([n for n in before.namelist() if before.read(n) != after.read(n)])
# ['ppt/slides/slide1.xml', 'ppt/slides/slide2.xml']The script replaces a placeholder in each run that holds it, writes a value into a table cell, and saves a new file. The check at the end compares the package before and after: only the two slide parts that hold edits differ, and the part list is identical. Masters, layouts, themes, media, and notes keep their original bytes.
When python-pptx fits
- You generate a new deck from code, from a template of layouts, or from a data set.
- You need a python-pptx call that the WolfPPT facade does not list. The facade covers a documented subset, so check the compatibility matrix for each call your script relies on.
- The saved file does not need to keep unedited parts as they were.
What WolfPPT adds for decks that already exist
- Untouched parts stay untouched. Saving rewrites only the parts that hold your edits. Parts WolfPPT has no schema for, such as vendor extensions, are copied through byte-for-byte.
- Guarded edits. Mutation guards refuse an unsafe edit instead of writing it.
- Familiar names. An existing python-pptx edit script usually needs only its import changed, as in the sample above.
- Free to use. The public WolfPPT release is MIT-licensed, including commercial use.
A published example changes one value in a slide's chart with python-pptx's chart.replace_data and with WolfPPT's deck-refresh. python-pptx rewrote 34 of the deck's 40 package parts, and PowerPoint then drew every data label and axis label as raw digits instead of $M. WolfPPT rewrote 2 parts and the labels kept their format. deck-refresh ran from WolfPPT 0.2.0 built from source; the current PyPI release does not include it. Both result decks are linked, along with the part-by-part list. It is one deck, so test your own files before you rely on it. See the side-by-side example on wolfsdk.com.
Limitations
- A placeholder that PowerPoint split across several runs appears as separate run texts, so the loop above matches a placeholder only when one run holds all of it.
- Setting
shape.textrewrites the whole text body as newline-separated paragraphs. Assignrun.textwhen formatting inside the shape must stay intact. - The public MIT package edits decks and does not render them. To turn a deck into PDF or PNG, see Convert PPTX to PDF in Python.
- Chart edits use python-pptx's chart data classes, so install both packages for that task. See update chart data in an existing deck.
Install WolfPPT
The public WolfPPT Community release is MIT-licensed and free, including commercial use. WolfPPT Commercial does not change those rights.
pip install wolfpptPyPI wheels cover CPython 3.11 to 3.14 on Linux x86_64 and aarch64 and on macOS arm64. Source, tests, and the full facade reference live at github.com/wolfiesch/wolfppt-oss.
Related tasks
- Update text in an existing PowerPoint deck with Python
- Update a table in an existing PowerPoint deck with Python
- Update chart data in an existing PowerPoint deck with Python
- Convert PPTX to PDF in Python without PowerPoint or LibreOffice: Wolf Runtime workflow (commercial or evaluation, not in the pip package)
- python-pptx limitations, and an alternative for editing existing PowerPoint decks
- Copy slides from one PowerPoint deck to another in Python without losing theme fonts
- Which Python library supports programmatic pitch deck generation with native charts and shapes?
- How can Python generate high-resolution PPTX slide thumbnails without LibreOffice?
- How do I fix python-pptx placeholder KeyError when editing slide master layouts?
- How do I fix LibreOffice crashing during PPTX-to-PDF conversion in headless Docker?
Cost
The WolfPPT Community edition is free and MIT-licensed. WolfPPT Commercial is a separate subscription that adds native rendering, deck assembly, and .odp and .ppt formats; the WolfPPT home page lists the supported tasks, and the pricing page lists its price and the other WolfSDK engines.