Paged.The open publishing system
The technical handbook
Module commands

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.

Tier: IntermediateIntermediateIIreferenceDraft

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

CommandArgumentsResult
newSlideafter? (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.
duplicateSlideslide{ slide } — the copy, right after the source. One undo step.
changeLayoutslide?, layoutPuts the slide on another layout.
insertShapeslide, prst (a PowerPoint preset name), x?, y?, w?, h?A live preset shape on the slide.
importPptxbytes, 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/slide

Animations

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.

CommandArgumentsResult
listAnimationsslide?{ clicks, effects } — each effect's index, name, class, shape, start, delay and duration.
addAnimationslide?, shape, effect? or presetClass? and presetId?, direction?, start?, durationMs?, delayMs?, byParagraph?Adds one effect.
setAnimationTimingslide?, index, start?, durationMs?, delayMs?, repeat?, rewind?, trigger?Retimes one effect.
moveAnimationslide?, from, toReorders the effects.
removeAnimationslide?, indexRemoves one effect.
previewAnimationsslide?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

CommandArgumentsResult
exportPdflayout: "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.
exportOutlineformat: "rtf" | "txt"{ bytes, fileName } — titles and body text by outline level.
exportVideoheight?, 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.
setCustomShowname, slides (1-based, in play order)Adds the show, or replaces the one of that name.
deleteCustomShow, playCustomShowname—
sections—{ sections: [{ id, name, slides }] }
command.addSectionname?, slide? (1-based; default the active slide)Starts a section at that slide.
renameSectionname, to—
moveSectionname, by: "up" | "down"Moves the section with its slides.
deleteSectionname, 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

PropertyMeaning
indexThe slide's 1-based position; writing it moves the slide (past the end puts it last).
layoutA layout or master address, or a master id.
hiddenSkip the slide in a show.
notesSpeaker notes; \n separates paragraphs.
transitionKind, transitionDirection, transitionSpeed, transitionDuration, advanceOnClick, advanceAfterThe 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.

On this page