Print your reveal.js presentation

I like the reveal.js framework for slide presentation, while I have even written a remote control for it.
Reveal allows branching of your slide presentation, has some zoom capability and can include external websites with interactive and dynamic plots. Best of all, the display is really full-frame when displayed with Chrome.
Maybe it is important to note, that I still produce slides in Keynote but export them into a directory that serves as a repository for building the final reveal presentation.

<div class="reveal">
  <div class="slides">
$files = glob($dir . '/*');
for ($i = 1; $i<= count($files); $i++) {
  echo '<section data-background-image="' . $i . '"/><span></span></section>';

Printing the final presentation isn’t straightforward as the built-in mechanism did not work for me with dynamic slides although they already exist:

Reveal.addEventListener( 'slidechanged', function(e) {

The only solution that worked for me is decktape which produces a valid PDF

brew install node
npm install -g decktape
decktape -s 1280x720 reveal http://myserver/reveal.php reveal.pdf