# Automating Conversion of reveal.js Slides to PDF

DevFeed: [Automating Conversion of reveal.js Slides to PDF](<https://devfeed.tech/articles/rediscovering-converting-reveal-js-slides-to-pdf-41908.md>)

Original publisher: [Read original article](<https://jpmens.net/2026/07/11/rediscovering-reveal-js-to-pdf/>)

Author: Jan-Piet Mens

Published: 2026-07-10T22:00:00Z

Content type: article

Language: en

Sources: [Jan-Piet Mens](<https://devfeed.tech/sources/jan-piet-mens.md>)

Topics: [Automation](<https://devfeed.tech/topics/automation.md>), [Emacs](<https://devfeed.tech/topics/emacs.md>), [Org mode](<https://devfeed.tech/topics/orgmode.md>), [HTML](<https://devfeed.tech/topics/html.md>), [make](<https://devfeed.tech/topics/make.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Google Chrome](<https://devfeed.tech/topics/google-chrome.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Script](<https://devfeed.tech/topics/script.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [automation](<https://devfeed.tech/tags/automation.md>), [browser](<https://devfeed.tech/tags/browser.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [docker](<https://devfeed.tech/tags/docker.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [html](<https://devfeed.tech/tags/html.md>), [jan-piet-mens](<https://devfeed.tech/tags/jan-piet-mens.md>), [jpm](<https://devfeed.tech/tags/jpm.md>), [jpmens](<https://devfeed.tech/tags/jpmens.md>), [make](<https://devfeed.tech/tags/make.md>), [npm](<https://devfeed.tech/tags/npm.md>), [script](<https://devfeed.tech/tags/script.md>)

## AI overview

The author describes using Emacs Org-mode and reveal.js to create training slide decks, then automating their conversion from HTML to PDF with decktape. They compare Docker-based and local installations, noting differences in Chrome and font rendering, and use a small shell script to run an HTTP server, invoke decktape, and clean up the process.

## Source excerpt

A few years ago I began using Emacs Org-mode and reveal.js to generate slide decks I use in trainings, and I've been pleased with the results. (I believe it was Carsten who got me hooked.) It took me a bit to get the settings just the way I wanted to have them, but since then it's been a matter of typing make in a command line to generate the HTML from the .org file using this in my Makefile, and the resulting *.html is what I open in a browser for display. presentation.html: presentation.org emacs -u jpm \ --batch presentation.org \ --eval '(load user-init-file)' \ -f org-reveal-export-to-html For printing and handouts I want a PDF, but that's always required a bit of manual work to convert the HTML to PDF, because the tools I tried back then didn't produce the result I could get manually by opening in a Chrome browser with a ?print-pdf attached the the URL and then a judicious print-to-PDF and save. My idea was to automate that, and I was prompted a few days ago to revisit decktape. I shy away from installing NPM stuff because like Maven, Rust, and whatnot, they typically make me download half an internet, so I began by using the docker image as described at decktape. However I disliked the fonts and the overall impression of the generated PDF. "Disliked" is possibly unfair, but it just looked different... It dawned on me then, obviously, that the docker image was running some incantation of Chrome on Linux, whereas I'm used to Chrome on Mac and its fonts, etc., so I then did actually install decktape locally with the resulting PDF looking exactly like what I was used to! I've now got "automation" to (mostly) get the PDF output the way I wish to have it with a small script I've named runoff.sh (yes, the name is intentional :-) #!/bin/sh set -e python3 -m http.server --bind 127.0.0.1 8108 & httpid=$! trap "{ echo Killing http.server on $httpid; kill $httpid; exit 0; }" 0 1 2 15 echo PID=$httpid npm exec decktape -- \ --size 998x780 \ --pdf-author "Jan-Piet Mens" \ --