# A little hack to get a pdf from your IPython slides

|   Source   |   Minimap

A lot of users of the slides option in IPython.nbconvert asked me about how to get a pdf from the generated Reveal.js-based slideshow.

To make the story short, here you have the detailed steps:

• cd in the directory where your slideshow lives
• add this custom.css file: https://gist.github.com/damianavila/6211198
• run this little snippet: https://gist.github.com/damianavila/6211211
• run python -m SimpleHTTPServer 8001
• open Mozilla Firefox browser and point to localhost:8001
• add ?print.pdf to the end of the url (ie, http://127.0.0.1:8001/your-ipynb.slides.html?print-pdf)
• print to pdf (use Landscape orientation)

Do you want to get this little hack integrated to IPython? @fperez, the IPython BDFL does:

So, time to write some code and do a PR... in the meantime use this hack ;-)

Damián.

Don't forget this blog post is an ipynb file itself! So, you can download it from the "Source" link at the top of the post if you want to play with it ;-)