pptx

Read, create, and edit PowerPoint presentations using python-pptx with slide manipulation, text extraction, and shape editing.

57.2k|7.0k|Updated Dec 28, 2025
Ready to run
npx skills add https://github.com/HKUDS/DeepTutor --skill pptx-hkuds
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: pptx
Source: https://github.com/HKUDS/DeepTutor/tree/main/deeptutor/skills/builtin/pptx
Command: npx skills add https://github.com/HKUDS/DeepTutor --skill pptx-hkuds

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-pptx.

What problem does it solve? Manually editing PowerPoint slides or programmatically generating decks from data is repetitive and error-prone. This Skill automates slide creation, content extraction, and structural modifications while preserving formatting and layout integrity. ## Core Features & Use Cases - Slide Generation: Build presentations from outlines, setting titles, bullet points, and layout structure programmatically. - Content Extraction: Pull text, speaker notes, tables, and metadata from existing decks for analysis or migration. - Shape & Image Editing: Replace images, modify table cells, edit chart data, and adjust text formatting at the run level. - Use Case: You have quarterly sales data and need to generate a 20-slide report deck with consistent branding. Use this Skill to create slides from a data outline, populate charts with live metrics, and export to PDF for distribution. ## Quick Start Create a new PowerPoint presentation with a title slide and a content slide containing bullet points about your topic.

Frequently Asked Questions about pptx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new PowerPoint presentation from scratch with python-pptx?▼

Instantiate a Presentation object, add slides using specific layout indices, then populate placeholders or text boxes with content. Use prs.slide_layouts to list available layouts, then set text via placeholders to preserve bullets and formatting.

How do I extract all text from a PowerPoint file?▼

Iterate through prs.slides, then through each shape's text_frame to collect paragraphs and runs. Extract speaker notes via slide.notes_slide.notes_text_frame. This gives you all text and formatting metadata without altering the original file.

Can I replace images in a PowerPoint deck without changing their size or position?▼

Yes, by locating the image's rId (relationship ID) in the underlying XML and overwriting the image part bytes directly. The replacement must use the same image encoding (PNG for PNG) to avoid file corruption.

What is the difference between editing text via placeholders versus text boxes?▼

Placeholders inherit layout-defined formatting (bullets, indentation, font) and are designed for slide templates, while text boxes are free-form. Always use placeholders for structured content to maintain design consistency.

Does python-pptx support converting .ppt legacy files?▼

python-pptx cannot directly open legacy .ppt files. Use LibreOffice (soffice) to convert .ppt to .pptx first, then process with python-pptx.

How do I export a PowerPoint presentation to PDF or images?▼

Use LibreOffice in headless mode via subprocess to convert .pptx to PDF, then pdftoppm to render slides as JPEG images. Both tools must be installed on the system; if unavailable, export is not possible.