PowerPoint export
astro-slides export --format pptx produces a real, editable PowerPoint file
— not a deck of slide screenshots. Text is real text frames, lists are real
bullets, tables are native tables, and speaker notes carry over. Your colleague
can open the .pptx in PowerPoint, Keynote, LibreOffice, or Google Slides and
edit it directly.
astro-slides export --format pptxThe default output file is <deck>.pptx in the project directory. Use
--output to choose a path:
astro-slides export --format pptx --output quarterly-review.pptxThe exporter is built on PptxGenJS, which writes genuine OOXML. See ADR-0007 for the rationale behind choosing editable OOXML over rasterized slides.
What maps to editable shapes
Section titled “What maps to editable shapes”The exporter reads each rendered slide and maps its content to native OOXML shapes:
| Slide content | Becomes |
|---|---|
| Headings and paragraphs | Editable text frames |
ul / ol lists | Native bulleted lists (with indent levels) |
| Tables | Native, editable tables |
| Images | Inlined images (embedded as data URLs) |
| Inline links | Text-run hyperlinks |
| Speaker notes | The slide’s Notes pane |
Positions and font sizes are derived from each element’s on-screen rectangle, so the layout of the exported slide follows what the deck actually renders.
What falls back to a screenshot
Section titled “What falls back to a screenshot”Some content can’t be expressed as editable OOXML. Those pieces are rasterized — captured as an image and placed on the slide:
- Code blocks — syntax highlighting doesn’t round-trip to OOXML text runs, so each code block is screenshotted and placed as an image.
- Slides marked
exportAs: image— the whole slide is rasterized (see below). - Slides with no mappable content — a slide built purely from visual composition (absolutely-positioned elements, SVG art) that yields no editable block is automatically rasterized instead of exporting blank.
- Every slide, when
--rasterizeis passed — see below.
--rasterize
Section titled “--rasterize”Rasterize every slide to a full-slide image. Use this when editability doesn’t matter and you want pixel-faithful reproduction of custom CSS, web components, or effects that OOXML can’t represent:
astro-slides export --format pptx --rasterizePer-slide exportAs: image
Section titled “Per-slide exportAs: image”To rasterize a single slide while keeping the rest editable, set
exportAs: image in that slide’s frontmatter:
---exportAs: image---
# This slide is rendered as a picture
Because it uses a custom animation OOXML can't represent.Other flags
Section titled “Other flags”PPTX honors the shared export flags:
--range "1,3-5,8"— export a subset of slides (Slidev-style spec, 1-indexed).--output <path>— output.pptxpath (default<deck>.pptx).--dark— force the dark color scheme.--executable-path <path>— bring your own Chromium binary.
astro-slides export --format pptx --range 1-10 --output deck.pptxSetting expectations
Section titled “Setting expectations”Out of scope for the current exporter:
- Charts — no embedded-Excel chart mapping (there’s no chart primitive in the deck format yet).
- Theme palette — colors are applied per-shape; there’s no full design-token → OOXML document-theme palette mapping.
- Animations and slide transitions — these do not survive the OOXML round trip.
Source
Section titled “Source”packages/cli/src/main.ts(PPTX section) —pxToIn/inToEmu/parseCssColor, thePptxRun/PptxElement/SlideModeltypes,buildPptxSlide/buildDeckPptxmapper, the in-browserDOM_WALKER, andexportDeckPptx.packages/core/src/routes/slide.astro— theas-notes-dataspeaker-notes payload and per-slidedata-export-as="image"attribute the exporter reads.packages/cli/package.json—@playwright/testdeclared as an optional peer.docs/decisions/0007-pptxgenjs-for-editable-pptx.md— the editable-OOXML decision.docs/built/13-export-pptx.md— phase notes.docs/architecture/cli.md— full CLI flag surface.