How to export reveal.js slides to PDF (and to PowerPoint)

Updated: · Dawwerni team

Title card showing a reveal.js slide deck being exported to a PDF document and a PowerPoint file

To export reveal.js to PDF, open the deck in Chrome or Edge with ?print-pdf added to the URL, press Ctrl+P (Cmd+P), choose Save as PDF, set margins to None and enable Background graphics. Each slide becomes one page with selectable text. For automation use decktape, and for a .pptx file use an HTML to PowerPoint converter.

Three ways to get a reveal.js deck out of the browser

reveal.js decks are web pages, which is great for presenting from a laptop and awkward when someone asks you to email the slides. There are three practical routes, and the right one depends on whether you need selectable text, a repeatable command, or a PowerPoint file the client can open.

The built-in print mode and decktape both produce PDFs with real text. A PowerPoint file needs a converter: our free HTML to PowerPoint tool recognises reveal.js decks, turns each slide into one 16:9 slide and keeps your speaker notes.

Built-in ?print-pdfdecktapeHTML to PPTX converter
OutputPDFPDF.pptx (and PDF or PNG)
Text selectable / editableSelectableSelectableNot editable (slide images)
SetupNone, Chrome or EdgeNode.jsNone, in the browser
Speaker notesOptional, printed on the pageNot includedKept as PowerPoint notes
Best forOne-off exportCI, scripts, many decksClients who want PowerPoint

Method 1: the built-in print-pdf mode

Since version 4, reveal.js ships its own print layout. When the URL contains the print-pdf query parameter, the deck lays every slide out one after another at the configured slide size, ready for the browser's print engine. The official documentation recommends Chrome or Chromium for this; Edge uses the same engine and works the same way.

  1. Open the deck in Chrome or Edge, for example http://localhost:8000/index.html.
  2. Add ?print-pdf to the address, before any # fragment: http://localhost:8000/index.html?print-pdf, and reload.
  3. Press Ctrl+P (Cmd+P on a Mac) and choose Save as PDF as the destination.
  4. Set Layout to Landscape, Margins to None, and tick Background graphics under More settings.
  5. Check the preview shows one slide per page, then save.
http://localhost:8000/index.html?print-pdf
http://localhost:8000/index.html?print-pdf#/3   (wrong order: the query must come before #)

Serve the deck instead of double-clicking the file

Opening index.html straight from disk usually works for a plain deck, but external Markdown slides, some plugins and certain fonts are blocked on file:// URLs. A tiny local server avoids that. Any static server works; two common ones are below.

# Python 3
python -m http.server 8000

# Node.js
npx serve .

Print options: fragments, notes and slide numbers

A few configuration options change what lands in the PDF. They go in Reveal.initialize. pdfSeparateFragments is true by default, which means a slide with three fragments prints as three pages, one per step; set it to false to print only the final state. showNotes adds speaker notes to the printed output, either overlaid on the slide or, with 'separate-page', on their own page after each slide. pdfMaxPagesPerSlide caps how many pages an overflowing slide may take.

Reveal.initialize({
  width: 1920,
  height: 1080,
  pdfSeparateFragments: false,   // one page per slide, final state
  pdfMaxPagesPerSlide: 1,        // never let a slide spill onto two pages
  showNotes: false,              // or true / 'separate-page' for handouts
  slideNumber: 'c/t'             // printed as 3/12 on each page
});

Method 2: decktape for repeatable exports

decktape is an open-source command-line tool that drives a headless Chromium, steps through the presentation slide by slide and writes a PDF. It understands reveal.js and several other HTML presentation frameworks, and it is the usual choice when you export decks in a script or a CI job. It needs Node.js installed.

# export a deck that is being served locally
npx decktape reveal http://localhost:8000/index.html slides.pdf

# force the page size to 1920x1080
npx decktape reveal --size 1920x1080 http://localhost:8000/index.html slides.pdf

# export only some slides
npx decktape reveal --slides 1-5 http://localhost:8000/index.html intro.pdf

Speaker notes that survive the export

reveal.js reads speaker notes from an aside element with the class notes inside each slide, or from a data-notes attribute on the section. Press S during the presentation to open the speaker view. Notes written this way are the ones that travel: the built-in print mode can print them with showNotes, and our converter copies them into the notes field of each PowerPoint slide, so you see them in Presenter View.

<section>
  <h2>Quarterly results</h2>
  <p>Revenue up in every region.</p>
  <aside class="notes">
    Mention the two new stores before showing the chart.
  </aside>
</section>

<section data-notes="Short notes can also go in an attribute.">
  <h2>Next steps</h2>
</section>

Method 3: reveal.js to PowerPoint (.pptx)

reveal.js has no PowerPoint export of its own. When a client or a conference asks for a .pptx, the realistic option is a converter that renders each slide and places it in a PowerPoint file. That is what the free HTML to PPTX converter does, entirely in your browser.

  1. If the deck loads reveal.js and its theme from a CDN, drop the single index.html into the tool. If it uses local files (dist/reveal.css, images, fonts), zip the whole folder and drop the .zip: relative paths are resolved inside the archive.
  2. The tool detects the reveal.js structure and shows one thumbnail per slide. Increase the wait time if your theme loads web fonts or charts that animate in.
  3. Choose PowerPoint and download. Each slide becomes a full-slide image on a 16:9 PowerPoint slide, with the aside notes copied into the speaker notes.
  4. Open the file in PowerPoint, Keynote or Google Slides to check the result and present with your notes.

Limits to know before you send the file

Which one should you use?

For sharing a deck by email, the built-in print-pdf route is the best default: no install, selectable and searchable text, small files. Use decktape when exports have to happen automatically or across many decks. Use a PPTX conversion when the recipient's workflow is built around PowerPoint, for example a conference that collects all talks in one file or a client who wants to present from their own laptop.

If you built the deck with an AI assistant rather than by hand, the same rules apply; the guide on turning a Claude artifact into PowerPoint covers prompts for slide-shaped HTML, and the PDF page size guide explains why 16:9 pages at 13.333 x 7.5 inches match PowerPoint widescreen.

FAQ

Why does ?print-pdf show a normal deck instead of a print layout?

The parameter must be in the query string before any hash, for example index.html?print-pdf#/2, and you need to reload the page after adding it. Very old reveal.js versions also needed a separate print stylesheet.

Why does my reveal.js PDF have more pages than slides?

Fragments are printed as separate pages by default. Set pdfSeparateFragments to false in Reveal.initialize. Slides with content taller than the slide also overflow onto extra pages; pdfMaxPagesPerSlide: 1 caps that.

Can I print reveal.js speaker notes?

Yes. Set showNotes to true to print notes on each slide, or to 'separate-page' to print them on a page after each slide, then use the print-pdf mode as usual.

Does reveal.js export to PowerPoint?

Not natively. Use an HTML to PPTX converter that renders each slide. With our free tool the slides become images, so text is not editable, but speaker notes in aside class notes are kept.

Does the reveal.js PDF export work in Firefox or Safari?

The reveal.js documentation recommends Chrome or Chromium for PDF export, and Edge behaves the same. Other browsers may produce wrong page sizes or missing backgrounds.

Try it: free HTML to PowerPoint converter

Runs in your browser: no upload, no sign-up, no watermark.

A free tool by Dawwerni, makers of gamified loyalty for local businesses.