exportPdf
Builds the presentations defined in kslidesBlock and prints each one to PDF via headless Chromium — kslides' one-command PDF export.
The presentations are served from the same Ktor server that HTTP output mode uses, bound to an ephemeral port, and each deck is loaded with reveal.js' ?print-pdf query parameter before being printed with Playwright. Output location, page size, per-presentation opt-out, and browser selection are configured via the pdf {} block inside output {} (see PdfConfig).
On first use, Playwright downloads its bundled browsers (cached per user); set PdfConfig.browserChannel to "chrome" or "msedge" to use an installed browser instead and skip the download.
Return
the files written, one PDF per exported presentation (plus one PNG per presentation when PdfConfig.previewPng is enabled).
Parameters
when non-null, export only the presentation whose path matches this name ("demo", "demo.html", and "/demo.html" are equivalent; the root presentation is "index"). Bypasses PdfConfig.excludes. When null, all non-excluded presentations are exported.
the same configuration block accepted by com.kslides.kslides.
Throws
if no presentation matches deck, or all are excluded.
if one or more presentations fail to export; the remaining presentations are still attempted first.