Steve Grunwell

Open-source contributor, speaker, and coffee snob

A wooden deck, sprinkled with flower petals and leaves

Exporting Reveal.js Slides to PDF using Decktape

After giving two talks last weekend and WordCamp NEO, one of the conference organizer emailed me and asked if I could provide PDF versions of my slide decks to send to WordPress.tv.

If you’ve seen one of my talks before, you may know that I’m a huge fan of Reveal.js, a JavaScript presentation framework that allows me to author my slides using Markdown, present in a browser, and share everything via GitHub Pages. Then, as I give talks at multiple conferences, people can see what’s changed, report any inaccuracies, and see my presentation history. Publishing my slides to GitHub also means I can link to relevant resources, put analytics on my slide decks, and tag each time a talk is given as a release. Pretty snazzy!

The drawback to using a Reveal.js deck, however, is that exporting to PDF can be painful. The framework includes a print stylesheet, but I was getting less-than-optimal results. Fortunately, the Reveal.js documentation also links to Decktape, which is fantastic.

How does Decktape work?

By simply cloning a Git repository, installing PhantomJS from a ready-made binary (Decktape is using a forked version), and making it executable, I get a command-line application that can read my slides from GitHub pages and give me a nice, PDF version of my JavaScript-powered slides:

That’s all it took to generate a PDF version of “Professional Development for Professional Developers”!┬áIt’s tools like Reveal.js and Decktape that have preventing me from having to work in Powerpoint since college, so thank you to the developers and contributors of both projects!

Phil Dunphy (of Modern Family) giving a thumbs up

Previous

WordPress Plugins: Procedural or OOP?

Next

Review: Building Exceptional Sites with WordPress & Thesis

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Be excellent to each other.