Witan Render

witan pptx render renders a full PowerPoint slide to PNG. Use it when an agent or CI check needs to inspect deck layout, chart output, typography, images, or visual regressions without opening PowerPoint.

witan pptx render deck.pptx --slide 1 -o slide-1.png

Output:

slide-1.png
slide=1 | dpr=1 | image/png

CLI Reference

witan pptx render <file.pptx> [flags]
Flag Default Description
--slide <n> Required 1-based slide number to render.
--dpr <n> 1 Device pixel ratio from 1 to 3.
--output, -o <path> Temp file Write image to this path.
--diff <path> - Compare against a baseline PNG and write a highlighted PNG diff.

What Renders

The renderer targets slide output, not the PowerPoint editor UI or print preview.

Area Supported Notes and gaps
Slide size and backgrounds Slide page size, solid backgrounds, gradient backgrounds, picture backgrounds, pattern backgrounds, and inherited layout/master backgrounds Background inheritance is resolved through the presentation model.
Layouts, themes, and placeholders Slide, layout, and master visual inheritance; scoped theme colors; common placeholders; title/body/content text style inheritance Placeholder materialization follows supported PowerPoint placeholder types.
Text Text frames, rich text runs, paragraphs, bullets, alignment, insets, wrapping, vertical alignment, auto-fit, hyperlinks, and common font styling Rendering uses deterministic font mapping rather than host-installed Office fonts.
Shapes Common preset shapes, connectors, fills, strokes, dash styles, rotation, flips, z-order, and shadows Some uncommon geometries may use fallback drawing.
Images PNG, JPEG, and SVG pictures; picture cropping; opacity; image fills; rotation and flips Unsupported image formats are skipped or rendered with fallback content.
Groups Group transforms, nested visuals, and ungrouped child rendering Complex inherited transforms are handled in model space before rasterization.
Tables Table rows, columns, cells, text, fills, borders, merged cells, margins, and style settings Table layout is rendered as slide geometry, not as editable grid UI.
Charts Classic and modern Office charts, including chart user shapes Chart support depends on Witan's shared chart engine.

Pixel Diff

Use --diff to compare a fresh render against a baseline PNG:

witan pptx render deck.pptx --slide 2 -o before.png
# ... edit the deck ...
witan pptx render deck.pptx --slide 2 --diff before.png -o diff.png

The diff image keeps changed pixels in full color, outlines changed regions for visibility, and desaturates unchanged areas. The metadata line appends a summary:

diff.png
slide=2 | dpr=1 | diff: 1,204 pixels changed (0.13%)

The baseline and current render must have identical dimensions. Use the same slide and DPR for both.

Inside exec

PowerPoint Office.js also exposes slide and shape image methods in the runtime:

const image = slide.getImageAsBase64({ height: 720, width: 1280 });
await context.sync();
return image.value;

For agent workflows, the standalone CLI command is usually better because it writes an image file and supports pixel diffs directly.