Generate pdf slides from reveal.js html

A year ago I started using Reveal JS for my presentations. It’s really cool to use asciidoctor and gradle to create my presentations and change them on-the-fly.

The problem

Well it’s not really a problem. But once a conference ends organizer want you to send him/her your slides. Because reveal.js is just html + js, it doesn’t qualify as something to send them. To do so I have to convert them first to pdf. And that’s why I need decktape.


DeckTape is a high-quality PDF exporter for HTML5 presentation frameworks. You can find the project at Github

Docker image

Nowadays every time I can I use docker containers. Instead of following a given installation guide, I can have it all just pulling the docker image from docker hub.

docker pull astefanutti/decktape

Execute docker image

Once you’ve executed asciidoctor task go to your build/asciidoc/revealjs/ folder (where you should find the index.html file` and execute the following command:

docker run --rm \
       -v `pwd`:/home/user \
       astefanutti/decktape /home/user/index.html /home/user/slides.pdf

That will create a file slides.pdf in the same folder. Anyway there are plenty of other options. For further information check out the project’s docker hub page