| name | pptx |
| description | Create, edit, inspect, and validate PowerPoint .pptx presentations, including slide text extraction, HTML-to-PPTX generation, OOXML editing, template reuse, comments, speaker notes, layouts, media, and visual thumbnail review. |
PPTX
PowerPoint files are ZIP archives containing OOXML. Use the workflow that matches the task and validate visually when producing or editing slides.
Read Or Inspect
python -m markitdown path-to-file.pptx
python ooxml/scripts/unpack.py input.pptx unpacked
Important paths:
ppt/presentation.xml: presentation metadata and slide references.
ppt/slides/slide{N}.xml: slide content.
ppt/notesSlides/notesSlide{N}.xml: speaker notes.
ppt/comments/modernComment_*.xml: comments.
ppt/slideLayouts/, ppt/slideMasters/, ppt/theme/: layout and design.
ppt/media/: images and media.
When matching an existing design, inspect ppt/theme/theme1.xml and representative slide XML for fonts, colors, placeholders, and spacing.
Create Without Template
Use the HTML-to-PPTX workflow. Before writing code, state a concise design approach based on the content and audience.
- Read
html2pptx.md completely.
- Create one HTML file per slide using the target slide size, e.g. 16:9
720pt x 405pt.
- Use HTML text elements (
p, headings, lists) for text. Use visible placeholder blocks for charts/tables/images that will be inserted with PptxGenJS.
- Rasterize gradients, SVG icons, and complex vector effects to PNG before embedding.
- Convert with
scripts/html2pptx.js and save with pptx.writeFile().
- Generate thumbnails and inspect them:
python scripts/thumbnail.py output.pptx workspace/thumbnails --cols 4
- Fix cutoff, overlap, contrast, alignment, and boundary issues; regenerate until clean.
Design constraints:
- Use web-safe fonts: Arial, Helvetica, Times New Roman, Georgia, Courier New, Verdana, Tahoma, Trebuchet MS, Impact.
- Keep hierarchy clear through size, weight, placement, and color.
- Use strong contrast and consistent spacing.
- For slides with charts/tables/images, prefer full-slide or two-column layouts; avoid vertical stacking under long text.
Edit Existing PPTX
Use OOXML editing for comments, notes, animations, layouts, formatting, or precise existing-slide changes.
- Read
ooxml.md completely.
- Unpack:
python ooxml/scripts/unpack.py input.pptx workdir
- Edit relevant XML, usually under
ppt/slides/ plus relationships when media or references change.
- Validate after each edit:
python ooxml/scripts/validate.py workdir --original input.pptx
- Pack:
python ooxml/scripts/pack.py workdir output.pptx
Create From Template
- Extract template text and thumbnails:
python -m markitdown template.pptx > template-content.md
python scripts/thumbnail.py template.pptx
- Read all extracted text and inspect thumbnails.
- Create
template-inventory.md listing every slide by zero-based index, layout purpose, placeholders, and suitable use.
- Map outline sections to template slide indices. Choose layouts that match actual content count; do not force two-column, three-column, image, or quote layouts when content does not fit.
- Rearrange/duplicate selected slides:
python scripts/rearrange.py template.pptx working.pptx 0,34,34,50
- Extract text inventory:
python scripts/inventory.py working.pptx text-inventory.json
- Read
text-inventory.json; generate replacement JSON only for existing slides/shapes.
- Apply replacements:
python scripts/replace.py working.pptx replacement-text.json output.pptx
- Generate thumbnails and inspect the result.
Replacement JSON rules:
- Shapes omitted from replacement JSON are cleared.
- Use
paragraphs, not replacement_paragraphs.
- Bullet paragraphs require
"bullet": true, "level": 0; do not include bullet characters in text.
- Preserve important properties from inventory: alignment, font size/name, bold/italic/underline, RGB
color, or theme_color.
- The replacement script validates missing slides/shapes and worsened text overflow.
Visual Review
python scripts/thumbnail.py deck.pptx [output_prefix] --cols 4
soffice --headless --convert-to pdf deck.pptx
pdftoppm -jpeg -r 150 deck.pdf slide
Inspect for text cutoff, overlap, slide-edge collisions, missing media, broken bullets, illegible contrast, and layout mismatch.
Code Style
Write concise PPTX automation code. Avoid unnecessary print statements, excessive temporary variables, and verbose rewrites of helper functionality already in scripts/.
Dependencies
Expected tools/libraries: markitdown[pptx], pptxgenjs, playwright, react-icons, react, react-dom, sharp, LibreOffice, Poppler, defusedxml.