pptxboss.dev

Examples

The source on the left, the slides it made on the right.

Every deck on this page was written by pptxboss 2.0, passes pptxboss check with no findings, and was rendered to these images by LibreOffice without any manual step. The Markdown, Python and Rust sources are shown as they ran.

Themes

One Markdown file, twelve themes.

A # heading becomes the title slide, a ## heading a content slide, list items bullets and a Notes: line the speaker notes. The theme sets twelve colors and two fonts; dark presets swap the light and dark slots so text stays readable. Title slides center the title in the first accent color, and bullets take the same color.

slides.md
# Ship decks from code

Markdown in, .pptx out

## What you get

- One command, one deterministic file
- 72 ECMA-376 rules run on every deck
- Twelve themes, from `office` to `tokyo`
  - light and dark, fonts included

Notes: Thirty seconds, then the demo.
~/decks
$ pptxboss create md office.pptx slides.md --theme office
$ pptxboss create md dark.pptx slides.md --theme dark
$ pptxboss create md slate.pptx slides.md --theme slate
$ pptxboss create md forest.pptx slides.md --theme forest
$ pptxboss create md sunset.pptx slides.md --theme sunset
$ pptxboss create md midnight.pptx slides.md --theme midnight
$ pptxboss create md mocha.pptx slides.md --theme mocha
$ pptxboss create md dracula.pptx slides.md --theme dracula
$ pptxboss create md nord.pptx slides.md --theme nord
$ pptxboss create md tokyo.pptx slides.md --theme tokyo
$ pptxboss create md clay.pptx slides.md --theme clay
$ pptxboss create md mono.pptx slides.md --theme mono
--theme officelightthe default: Office colors, Calibri
Title slide of the Markdown deck with the office themeBullet slide of the Markdown deck with the office theme
--theme darkdarkneutral dark grey with sky-blue accents
Title slide of the Markdown deck with the dark themeBullet slide of the Markdown deck with the dark theme
--theme slatelightcool greys, Georgia titles
Title slide of the Markdown deck with the slate themeBullet slide of the Markdown deck with the slate theme
--theme forestlightgreens and amber on off-white
Title slide of the Markdown deck with the forest themeBullet slide of the Markdown deck with the forest theme
--theme sunsetdarkplum gradient master, coral accents
Title slide of the Markdown deck with the sunset themeBullet slide of the Markdown deck with the sunset theme
--theme midnightdarknear-black with an emerald accent
Title slide of the Markdown deck with the midnight themeBullet slide of the Markdown deck with the midnight theme
--theme mochadarkthe Catppuccin Mocha palette
Title slide of the Markdown deck with the mocha themeBullet slide of the Markdown deck with the mocha theme
--theme draculadarkthe Dracula palette
Title slide of the Markdown deck with the dracula themeBullet slide of the Markdown deck with the dracula theme
--theme norddarkthe Nord palette
Title slide of the Markdown deck with the nord themeBullet slide of the Markdown deck with the nord theme
--theme tokyodarkthe Tokyo Night palette
Title slide of the Markdown deck with the tokyo themeBullet slide of the Markdown deck with the tokyo theme
--theme claylightwarm cream, terracotta, serif titles
Title slide of the Markdown deck with the clay themeBullet slide of the Markdown deck with the clay theme
--theme monolightwhite, near-black, one blue accent
Title slide of the Markdown deck with the mono themeBullet slide of the Markdown deck with the mono theme

The same presets are Theme::tokyo() in Rust and Theme.preset("tokyo") in Python, and any of them takes new colors, fonts and backgrounds before use. Styling in the guide →

Python

Runs, columns beside a picture, a table and a gradient close.

A paragraph is a list of runs. Each run carries bold, italic, underline, strikethrough, size, a color (a hex value or a theme slot such as accent2), a font and a link. The third slide gives no coordinates at all: the layout engine sets the bullets beside the picture, seven twelfths to five, and stacks the table below, each row as tall as its cells. Tables draw a header rule in the first accent color and no cell fills, so they read on light and dark themes alike. The last slide has its own gradient background.

release.py
from pptxboss.write import Background, Picture, Presentation, Run, Slide, Theme

deck = Presentation(theme=Theme.preset("mocha"), title="Release notes")

deck.add(Slide("pptxboss 2.0", subtitle="a layout engine, twelve themes, runs and backgrounds", notes="Thirty seconds on what shipped."))

deck.add(
    Slide("What changed")
    .bullet([Run("Blocks and columns", bold=True), " placed by the engine, no coordinates"])
    .bullet(["Body text shrinks to the theme's minimum, then ", Run("continues", color="accent2"), " on the next slide"])
    .bullet(["Runs carry ", Run("bold", bold=True), ", ", Run("italic", italic=True), ", ", Run("color", color="#F38BA8"), " and ", Run("links", link="https://pptxboss.dev")])
    .bullet("Backgrounds: solid, gradient or picture")
    .bullet("on the master, one layout or one slide", level=1)
)

deck.add(
    Slide("Numbers").columns(
        ["Twelve presets, from office to tokyo", "Six font families measured for fitting", "Every deck passes pptxboss check"],
        Picture(open("chart.png", "rb").read(), description="cold starts by week"),
    ).table(
        [["Metric", "1.1", "2.0"], ["Presets", "12", "12"], ["Block kinds", "0", "4"], ["Fonts measured", "0", "6"]],
    )
)

deck.add(
    Slide("Thanks", background=Background.linear("#1E1E2E", "#45475A", 45))
    .paragraph([Run("Questions?", size=44, bold=True, color="accent1")], align="center")
    .paragraph(["Docs at ", Run("pptxboss.dev/docs", link="https://pptxboss.dev/docs/", color="accent2")], align="center")
)

deck.save("release.pptx")
Slide 1 of the release notes deck
Slide 2 of the release notes deck
Slide 3 of the release notes deck
Slide 4 of the release notes deck

Rust

A preset, adjusted, with a gradient title layout and an inverted slide.

The Tokyo Night preset with a new first accent and Georgia titles. The title layout gets a gradient of its own, so every title slide in the deck shows it. The last slide fills its background with the accent color and is marked inverted, which swaps the light and dark text slots for that slide only. The file is examples/styled.rs in the writer crate; run it with cargo run --example styled.

styled.rs
//! A themed deck with formatted runs, a gradient title layout, a table and
//! an inverted slide. Run with `cargo run --example styled -- styled.pptx`.

use pptxboss_write::{
    Align, Background, Color, Layout, Paragraph, Presentation, Rect, Rgb, Run, SchemeColor, Slide,
    Theme,
};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let out = std::env::args()
        .nth(1)
        .unwrap_or_else(|| "styled.pptx".to_string());

    let theme = Theme::tokyo()
        .color(SchemeColor::Accent1, Rgb::hex("#7DCFFF").unwrap())
        .fonts("Georgia", "Calibri")
        .layout_background(
            Layout::Title,
            Background::linear(
                Color::hex("#1A1B26").unwrap(),
                Color::hex("#2F3453").unwrap(),
                45,
            ),
            false,
        );

    let deck = Presentation::new()
        .theme(theme)
        .slide(Slide::title_slide(
            "Platform review",
            Some("Infrastructure, Q3 2026"),
        ))
        .slide(
            Slide::titled("Where the quarter went")
                .body_paragraph(Paragraph::bullet_runs(
                    vec![
                        Run::text("Cold starts ").bold(),
                        Run::text("down 86%").color(Color::Scheme(SchemeColor::Accent4)),
                        Run::text(" after the allocator swap"),
                    ],
                    0,
                ))
                .body_paragraph(Paragraph::bullet_runs(
                    vec![
                        Run::text("Every deck passes "),
                        Run::text("pptxboss check").font("Menlo"),
                        Run::text(" in CI"),
                    ],
                    0,
                ))
                .sub_bullet("72 rules, zero findings on 1,240 decks", 1)
                .body_paragraph(Paragraph::bullet_runs(
                    vec![
                        Run::text("Runbook: "),
                        Run::text("pptxboss.dev/docs").link("https://pptxboss.dev/docs/"),
                    ],
                    0,
                ))
                .notes("Two minutes, then the numbers."),
        )
        .slide(Slide::titled("The numbers").table(
            Rect::inches(0.7, 1.7, 11.9, 2.6),
            vec![
                vec!["Metric".into(), "June".into(), "September".into()],
                vec!["p50 cold start".into(), "840 ms".into(), "118 ms".into()],
                vec!["Decks verified".into(), "310".into(), "1,240".into()],
                vec!["Findings".into(), "14".into(), "0".into()],
            ],
            true,
        ))
        .slide(
            Slide::titled("Next quarter")
                .inverted()
                .background(Background::solid(Color::Scheme(SchemeColor::Accent1)))
                .body_paragraph(
                    Paragraph::runs(vec![Run::text("Templates").bold().size(40)])
                        .align(Align::Left),
                )
                .body_paragraph(Paragraph::text(
                    "Append slides to an existing deck and keep its master.",
                )),
        );

    deck.write_to(&out)?;
    println!("wrote {out}");
    Ok(())
}
Slide 1 of the platform review deck
Slide 2 of the platform review deck
Slide 3 of the platform review deck
Slide 4 of the platform review deck

Layout engine

Fourteen agenda items, thirty-six rules, a twenty-eight row table. No coordinates.

Text is measured with font metrics embedded in the crate. When a slide is full the body shrinks in steps, never below the theme's minimum of eighteen points; what still does not fit continues on the next slide, split evenly, and a table carries its header row along. The agenda splits seven and seven at full size, the list of rules takes three slides at one size, the table two with the header on both. The picture keeps its aspect ratio beside the text, the last title shrank to fit its frame. The file is examples/placed.rs in the writer crate.

placed.rs
//! A deck laid out by the engine: a full agenda that shrinks, a list that
//! continues on a second slide, text beside a picture, a long table that
//! carries its header over, and stacked blocks. Run with
//! `cargo run --example placed -- placed.pptx [picture.png]`.

use pptxboss_write::{Block, Paragraph, Presentation, Slide, Theme};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut args = std::env::args().skip(1);
    let out = args.next().unwrap_or_else(|| "placed.pptx".to_string());
    let picture = args.next().map(std::fs::read).transpose()?;

    let mut agenda = Slide::titled("Agenda").notes("Fourteen items shrink to fit.");
    for topic in [
        "Where the quarter went",
        "Cold starts and the allocator swap",
        "Verification in CI",
        "The numbers",
        "What broke",
        "What we fixed",
        "Open incidents",
        "Hiring",
        "Budget",
        "Roadmap",
        "Templates",
        "Markdown depth",
        "Questions",
        "Thanks",
    ] {
        agenda = agenda.bullet(topic);
    }

    let mut list = Slide::titled("Every rule we check");
    for i in 1..=36 {
        list = list.bullet(format!(
            "Rule {i}: a finding with a sentence long enough to wrap onto a second line at body size"
        ));
    }

    let mut rows = vec![vec![
        "Deck".to_string(),
        "Slides".to_string(),
        "Findings".to_string(),
    ]];
    rows.extend((1..=28).map(|i| {
        vec![
            format!("deck-{i:02}.pptx"),
            (i * 3).to_string(),
            (i % 4).to_string(),
        ]
    }));

    let beside: Block = match &picture {
        Some(data) => {
            Block::picture_described(data.clone(), "the picture passed on the command line")
        }
        None => Block::bullets([
            "Pass a picture path as the second argument",
            "and it appears in this column",
        ]),
    };

    let deck = Presentation::new()
        .theme(Theme::nord())
        .slide(Slide::title_slide(
            "Layout without coordinates",
            Some("blocks, columns, fitting and continuation"),
        ))
        .slide(agenda)
        .slide(list)
        .slide(
            Slide::titled("Text beside a picture")
                .columns(vec![
                    Block::bullets([
                        "The text column takes seven twelfths",
                        "The picture keeps its aspect ratio",
                        "Both start at the same height",
                    ]),
                    beside,
                ])
                .notes("Columns split seven to five when one side is a picture."),
        )
        .slide(Slide::titled("Decks verified this week").block(Block::table(rows, true)))
        .slide(
            Slide::titled("Stacked blocks")
                .paragraph("A paragraph, then a table, then whatever room is left.")
                .block(Block::table(
                    vec![
                        vec!["Metric".into(), "June".into(), "September".into()],
                        vec!["p50 cold start".into(), "840 ms".into(), "118 ms".into()],
                        vec!["Findings".into(), "14".into(), "0".into()],
                    ],
                    true,
                ))
                .block(Block::text(vec![
                    Paragraph::text("Three columns of plain text below the table.")
                ]))
                .columns(vec![
                    Block::bullets(["one", "two"]),
                    Block::bullets(["three", "four"]),
                    Block::bullets(["five", "six"]),
                ]),
        )
        .slide(Slide::titled(
            "A title long enough that it cannot stay at forty-four points and still fit inside the frame the master gives it",
        ).bullet("The title shrank; this bullet did not."));
    deck.write_to(&out)?;
    Ok(())
}
Slide 1 of the layout engine deck
Slide 2 of the layout engine deck
Slide 3 of the layout engine deck
Slide 4 of the layout engine deck
Slide 5 of the layout engine deck
Slide 6 of the layout engine deck
Slide 7 of the layout engine deck
Slide 8 of the layout engine deck
Slide 9 of the layout engine deck
Slide 10 of the layout engine deck
Slide 11 of the layout engine deck

The sources and the script that builds, verifies and renders these decks live in the site repository. Install with pip install pptxboss, cargo add pptxboss-write or cargo install pptxboss-cli.