| name | powerpoint-presentation-editing |
| description | Edit and restructure PowerPoint presentations (.pptx) with an iterative render-and-inspect loop. Use when you must preserve existing media (images, GIFs, embedded videos), update slide text/layout, reorder slides, or export slide previews (PDF/PNGs) for visual review. |
PowerPoint Presentation Editing
Workflow (Edit -> Render -> Inspect)
- Create a backup and work in versioned copies (never overwrite the only deck).
- Baseline render to PNGs for fast visual review:
- Run
bash scripts/render_pptx.sh INPUT.pptx OUT_DIR [DPI].
- Inspect the relevant
OUT_DIR/slide-XX.png files with functions.view_image.
- Inspect deck contents programmatically (optional):
python3 scripts/extract_slide_text.py INPUT.pptx for a per-slide text dump.
python3 scripts/inspect_slide.py INPUT.pptx --slide N for shape bounds + text.
- Make one small change at a time (one slide, one layout fix, etc.).
- After every change:
- Verify media preservation:
bash scripts/diff_pptx_media.sh BEFORE.pptx AFTER.pptx.
- If the diff is non-empty, STOP: you likely dropped/modified embedded assets.
- Re-render and visually re-check only the changed slide(s).
Scripts
Render PPTX -> PDF -> per-slide PNGs
bash scripts/render_pptx.sh INPUT.pptx OUT_DIR
bash scripts/render_pptx.sh INPUT.pptx OUT_DIR 220
Outputs:
OUT_DIR/<deck-name>.pdf
OUT_DIR/slide-01.png, OUT_DIR/slide-02.png, ...
Diff embedded assets between two PPTX files
bash scripts/diff_pptx_media.sh OLD.pptx NEW.pptx
Compares zipped package entries under:
ppt/media/
ppt/embeddings/
ppt/oleObjects/
Quick inspection utilities
python3 scripts/extract_slide_text.py INPUT.pptx
python3 scripts/inspect_slide.py INPUT.pptx --slide 7
Notes
- PDF/PNG renders cannot play videos/animations; they show a poster frame/placeholder.
- python-pptx cannot reorder slides via public API. For a pragmatic internal workaround, see
references/reorder_slides.md.