Skip to content

Repository files navigation

DeckRender

Render PPTX, PDF, DOCX, Keynote, HTML and Markdown into images, PDF or video.

DeckRender turns supported document and web inputs into images, PDFs, or videos through one predictable CLI and TypeScript contract. Use it to move visual document work out of one-off desktop steps and into repeatable software workflows.

It renders what the DeckFlow cloud can convert, which is a real list rather than "anything": run deckrender formats, or read the matrix below.

deckrender deck.pptx -o deck.png
deckrender deck.pptx -o deck.pdf
deckrender deck.pptx -o deck.mp4

It is to documents what ffmpeg is to media: one command, a small set of flags, predictable output. It deliberately does not parse content, extract text, or edit files — those belong to other tools in the DeckFlow family.

Where it creates value

  • Product previews and delivery — turn document pages and slides into visual artifacts that web and mobile products can display.
  • AI vision pipelines — create page or slide images for multimodal models and document-understanding workflows.
  • Automated publishing — generate images, PDFs, or videos from scripts and CI when the selected input/output route supports them.
  • Review handoffs — produce concrete visual artifacts that people or agents can inspect before downstream delivery.

Install

npx -y @deckflow/deckrender@latest deck.pptx
npm install -g @deckflow/deckrender

Requires Node.js 18 or newer.

Quick start

Render every slide to PNG. With no -o, output lands in a directory named after the input:

$ deckrender presentation.pptx
presentation/
presentation/
├── 001.png
├── 002.png
└── 003.png

Pick a format, a size, and a page range:

deckrender report.pdf --pages 1-5 --width 2560 -o pages/
deckrender deck.pptx --format pdf -o deck.pdf
deckrender page.html -o screenshot.png
deckrender https://example.com -o screenshot.png
cat page.html | deckrender - --from html -o screenshot.png

Machine-readable output for scripts and agents:

$ deckrender deck.pptx --json
{
  "ok": true,
  "input": "deck.pptx",
  "format": "image",
  "engine": "cloud",
  "route": ["convertor.ppt2image"],
  "pages": 3,
  "outputs": [
    { "page": 1, "file": "presentation/001.png", "width": 1920, "height": 1080, "bytes": 184320 }
  ],
  "durationMs": 8123
}

Supported formats

deckrender formats
Input → image → pdf → video
.pptx
.ppt 🕓
.pdf 🕓
.key 🕓
.docx
.doc
.xlsx 🕓 🕓
.pages 🕓 🕓
.numbers 🕓 🕓
.html + URLs
.md

Image output supports png, jpg and webp via --image-format.

🕓 means the DeckFlow cloud has no converter for it yet; those report not_implemented with a message naming the missing backend task — the full list is under Coming soon. Unsupported pairs fail with a clear message rather than producing something approximate.

Every supported cell is a cloud conversion. DeckRender renders nothing itself, so the matrix is exactly what the backend can do, and a format it cannot convert stays unsupported until it can.

Pages and Numbers are recognized but not renderable yet — DeckRender will not answer with the thumbnail iWork embeds. Export to PDF or PPTX and render that. Keynote .key is unaffected.

Legacy Word .doc files are not supported. Save them as .docx or export them to PDF first. Legacy PowerPoint .ppt files support image and video output; PDF conversion waits on the backend.

Full detail, including which flags each route accepts: docs/formats.md.

Authentication is optional

DeckRender works with no setup at all — rendering runs in guest mode. Log in when you want higher quotas or a private workspace:

deckrender auth login

Credentials are stored in ~/.deckflow/credentials and shared across every DeckFlow CLI. Log in once through DeckRender and DeckHTML picks it up too, and vice versa. If your machine already has DECKHTML_API_KEY set, or you have logged in with the deckops CLI, DeckRender uses that automatically.

A credential the backend rejects is treated as no credential: DeckRender drops it and retries the render in guest mode, warning on stderr rather than failing. Rendering is supposed to work with no setup at all, and stale state on a machine should not take that away. See docs/errors.md.

deckrender config list    # shows every value and exactly where it came from

See docs/configuration.md for the full resolution order.

Use it as a library

The CLI and the programmatic API ship in the same package.

import { render } from '@deckflow/deckrender';

const result = await render({
  input: 'deck.pptx',
  format: 'image',
  pages: '1-10',
  out: 'frames/',
});

console.log(result.route); // ['convertor.ppt2image']
console.log(result.outputs); // [{ page: 1, file: 'frames/001.png', ... }]

Reuse configuration, or swap in your own render backend:

import { createRenderer, type RenderEngine } from '@deckflow/deckrender';

const renderer = createRenderer({
  apiKey: process.env.DECKFLOW_API_KEY,
  onWarning: (message) => console.warn(message),
});

Documentation

Quick start Install and first render
CLI reference Every command and flag
Formats What converts to what, and the flags each route accepts
Profiles Named flag presets
Configuration Credentials, shared auth, render defaults
Errors Error codes and exit codes
Roadmap What is coming and what is blocked upstream

How it works

Input (file | URL | stdin)
   → InputResolver     normalize and classify
   → RenderPlan        route table: source × target → ordered backend tasks
   → CloudEngine       DeckOps tasks; the only renderer DeckRender ships
   → ArtifactWriter    page selection, naming, files / directory / zip
   → Result            human text or --json

Rendering is performed by @deckops/sdk. DeckRender contributes the input model, the render routing, artifact naming, and a stable output contract.

Where rendering happens

Rendering happens in the DeckFlow cloud. The document is uploaded over HTTPS, converted there, and the artifacts are downloaded back. There is no local render path, and no local fallback for a format the backend cannot convert.

Route Where What leaves your machine
everything in the matrix DeckFlow cloud the document, and any intermediate artifact
.pdf → pdf your machine nothing — the file is copied as-is

.pdf → pdf is the one exception, and it is a file copy rather than a render: the input is already in the target format.

--json reports the engine that ran — cloud or passthrough — so you can check rather than assume. What DeckFlow does with an uploaded document is the cloud service's policy, not this client's. If your documents cannot leave your machine, DeckRender is not the tool for it — settle that before adopting it.

Full detail, including chained routes and URL input: docs/formats.md.

Development

Issues and pull requests are welcome. Node.js 18 or newer.

pnpm install
pnpm check                    # typecheck + lint + unit + integration
pnpm build && pnpm test:e2e   # e2e drives the built binary

DECKRENDER_E2E=1 pnpm test:cloud    # guest render against the live backend
pnpm test:conformance              # every format pair; needs credentials

The route table in src/core/routes.ts decides what converts to what, and every entry in it is a backend task. Probe the backend before adding to it — several plausible-looking conversions do not actually work, so a route inferred from type definitions alone can be wrong. pnpm test:conformance confirms the matrix end to end.

A format the backend cannot convert stays unsupported. Do not add a local renderer, extractor or fallback to cover the gap: the fix belongs upstream, and a gap that is visible is a gap that gets fixed. See the roadmap.

The --json envelope, error codes, exit codes and the shared credential file format are what other people's scripts depend on. Changing any of them is a breaking change; note it in CHANGELOG.md.

License

MIT © DeckFlow

About

Render any document format into visual artifacts — PPTX, PDF, DOCX, Keynote, Pages, Numbers, HTML and Markdown to images, PDF or video.

Topics

Resources

Security policy

Stars

8 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages