Paged Docs / Module commands
paged.slide commands
paged.slide's typed commands and objects — slides, notes and transitions, animations, PDF, outline and video output, custom shows, sections, and .pptx in and out.
Reviewed against engine v0.77.0
A deck's slides as objects, and its verbs as commands.
In short paged.slide's typed commands have ids
media.paged.slide.<name>; its slides, layouts and placeholders are objects at
plugin:media.paged.slide/<kind>/<id>. How to call them:
Module commands.
Typed commands
| Command | Arguments | Result |
|---|---|---|
newSlide | after? (a slide or page address; default: after the last slide), layout? (default: the after slide's layout) | { slide } — a slide of that layout with its placeholders in place and empty, as the Slides panel makes it. One undo step. |
duplicateSlide | slide | { slide } — the copy, right after the source. One undo step. |
changeLayout | slide?, layout | Puts the slide on another layout. |
insertShape | slide, prst (a PowerPoint preset name), x?, y?, w?, h? | A live preset shape on the slide. |
importPptx | bytes, name | { slides, fonts, diagnostics } |
exportPptx | — | { bytes, fileName, diagnostics, notExported } |
exportPptx writes the deck the document was opened from together with the
document's edits: slide order, duplicated and deleted slides, hidden flags,
notes, sections and custom shows, and the slides' content. A slide the document
did not change keeps its bytes; an edited slide keeps its original XML except
the shapes that changed; shapes and slides made in the editor are written whole.
What cannot round-trip yet (an effect change, an edit inside SmartArt, an added
table row, and others) is listed in notExported, one line per shape, and that
shape is written as the deck had it. The file is named after the document
(<name>.pptx), else the deck, else presentation.pptx. A document not opened
from a deck is refused.
paged-node invoke pitch.pptx media.paged.slide.duplicateSlide \
'{"slide":"plugin:media.paged.slide/slide/<pageId>"}' -o pitch.paged --plugins=@paged-media/slide
paged-node invoke pitch.paged media.paged.slide.exportPptx '{}' \
--result-out pitch.pptx --no-save --plugins=@paged-media/slideAnimations
A slide's animations are its PowerPoint timeline. slide defaults to the active
slide; an effect is addressed by its index in the slide's list.
| Command | Arguments | Result |
|---|---|---|
listAnimations | slide? | { clicks, effects } — each effect's index, name, class, shape, start, delay and duration. |
addAnimation | slide?, shape, effect? or presetClass? and presetId?, direction?, start?, durationMs?, delayMs?, byParagraph? | Adds one effect. |
setAnimationTiming | slide?, index, start?, durationMs?, delayMs?, repeat?, rewind?, trigger? | Retimes one effect. |
moveAnimation | slide?, from, to | Reorders the effects. |
removeAnimation | slide?, index | Removes one effect. |
previewAnimations | slide? | Plays the slide's animations over the canvas, in the editor. |
Each change is one undo step and is written back to the deck's timing on export.
Output, custom shows and sections
| Command | Arguments | Result |
|---|---|---|
exportPdf | layout: "slides" | "handouts" | "notes", perPage? (handouts: 1, 2, 3, 4, 6 or 9), paper?: "letter" | "a4", dpi?, includeHidden?, slides? | { bytes, fileName, pages, replaced } — replaced counts notes characters the PDF's standard font could not draw. |
exportOutline | format: "rtf" | "txt" | { bytes, fileName } — titles and body text by outline level. |
exportVideo | height?, fps?, secondsPerSlide?, useTimings?, codec?: "auto" | "avc" | "vp9", slides? | An MP4 with the transitions and animations playing. Needs a browser's video encoder, so it does not run headless. |
command.saveAsTemplate | — | The deck as a .potx. |
setCustomShow | name, slides (1-based, in play order) | Adds the show, or replaces the one of that name. |
deleteCustomShow, playCustomShow | name | — |
sections | — | { sections: [{ id, name, slides }] } |
command.addSection | name?, slide? (1-based; default the active slide) | Starts a section at that slide. |
renameSection | name, to | — |
moveSection | name, by: "up" | "down" | Moves the section with its slides. |
deleteSection | name, withSlides? | Removes the section; its slides join the one before, or with withSlides are deleted too. |
The slide PDFs are images of the slides at dpi (150 by default), laid out one
to a page, as handouts or as notes pages; the host's own PDF export stays the
vector one for slides one to a page. Masters, layouts and themes have commands
too (layouts, renameLayout, setPreserve, deleteLayout,
insertPlaceholder, setPlaceholderStyle, themes, applyTheme), and so do
comments and SmartArt text; paged commands --owner media.paged.slide lists
them all with their schemas.
Slide properties
| Property | Meaning |
|---|---|
index | The slide's 1-based position; writing it moves the slide (past the end puts it last). |
layout | A layout or master address, or a master id. |
hidden | Skip the slide in a show. |
notes | Speaker notes; \n separates paragraphs. |
transitionKind, transitionDirection, transitionSpeed, transitionDuration, advanceOnClick, advanceAfter | The transition and advance settings PowerPoint keeps. |
A placeholder's content is writable too. Slides are made with newSlide, not
with create; delete removes one.
Palette commands and menus
In the editor each verb is also a palette command with a menu entry, offered only where it applies, acting on the active slide: File ▸ Open PowerPoint deck…, File ▸ Export PowerPoint deck…, File ▸ Export… (the Export view for PDF, outline and video) and File ▸ Save as template…; Slide Show ▸ Custom Shows…; and New slide, Duplicate slide, Delete slide, Move slide up, Move slide down, Add Section, Previous slide, Next slide and New comment under Plugins ▸ Slide. An opened deck exports under the deck's own name.
paged.doc commands
paged.doc's objects and typed commands — a Word document's blocks, table cells, runs and merge fields as writable objects, placing and exporting .docx, and a .docx opened on its own headless.
paged.publish commands
paged.publish's typed commands — the PDF exporter with every option, bookmarks and tagged PDF included, its preflight, and IDML import and export as bytes.