Skip to content

Export to PDF, PNG, PPTX

Export runs a real browser (Playwright) against the built deck and prints it, so what you get is what the audience saw.

Terminal window
npx kadal-deck export # PDF into export/ (builds and previews the deck itself)
npx kadal-deck export --png --pptx # also one PNG per slide, and a PPTX with your notes attached
npx kadal-deck export --url http://localhost:5173/ # use a running dev server instead of building
npx kadal-deck export --out dist-export --scale 1

Playwright’s Chromium is needed once: npx playwright install chromium.

Option Meaning
--png one PNG per slide
--pptx a PowerPoint file, one image per slide, notes attached
--url <url> export a deck that is already running
--out <dir> where to write (default export/)
--scale <n> the scale the slides are captured at
--posters only capture posters for embedded pages, then stop
--refresh-posters capture posters again even where one exists
--no-posters skip poster capture

Deck options that shape the PDF: pdfSeparateFragments (a page per step, default on) and pdfMaxPagesPerSlide.

A web page embedded with layout: iframe* or <Iframe> can’t be live in a PDF, the overview, the presenter’s next-slide box or the scroll view. A poster stands in, in this order:

  1. poster: shots/map.jpg on the slide (or <Iframe poster>);
  2. else the screenshot export captures for that URL at the pane’s size, into public/posters/;
  3. else a card with the address.

posterUrl: photographs a different address than the one embedded — the same page in a state its URL doesn’t carry — and posterWait: gives it longer than the default five seconds to settle. Posters are captured before every export, so they ship with the build; commit them.

/?print-pdf lays every slide out as a page. On screen the pages are zoomed to the window; the browser’s print dialog gets them at full size.