Eduardo Garcia bio photo


Eduardo Garcia

Knowmad by definition

Location: Costa Rica

Twitter Facebook  QQ交谈 Google+ Github LinkedIn Feed

Nowadays there are a lot of tools to create online presentations, because are more dynamic and with more effect, in summary, because are fancy and hipster.

The problem I face and I am sure a lot of people are in the same situation, is how to create an offline version of those online slides.

Following instructions from my friend Jesus Manuel I ran a process to export to PDF using another sexy tool as you can imagine and I am going to document here.

Firstly, you need to install Decktape which is a is a high-quality PDF exporter for HTML5 presentation frameworks built on top of a forked version PhantomJS.

$ git clone --depth 1

Secondly, you need to install the PhantomJS fork available for your platform.

$ cd decktape
$ curl -L -o bin/phantomjs
$ chmod +x bin/phantomjs

Current list of versions available

# Windows (MSVC 2013), 64-bit, for Windows Vista or later, bundles VC++ Runtime 2013
 $ curl -L -o bin\phantomjs.exe
 # Mac OS X (Cocoa), 64-bit, for OS X 10.6 or later
 $ curl -L -o bin/phantomjs
 # Linux (CentOS 6), 64-bit
 $ curl -L -o bin/phantomjs
 # Linux (CentOS 7), 64-bit
 $ curl -L -o bin/phantomjs
 # Linux (Debian 8), 64-bit
 $ curl -L -o bin/phantomjs

Finally, you can export your slides as PDF, check the example below.

$ bin/phantomjs decktape.js ~/Desktop/srijan-mastering-d8.pdf --screenshots-size=800x600

In my case, my slides were built with Reveal.js, but you can use any HTML presentation framework.

I hope did you found this articel useful.


comments powered by Disqus