Convert a Keynote presentation to a set of hi-res images

To create presentations I like to use Keynote, mainly thanks to its animation feature. I admit that it took me some time to get accustomed to it – and that not all is perfect – but I think I’ve become efficient at using it over time. The transitions and animations – such as seen in the recording of my CSS Day talk on the Cascade – really help convey the message.

One of my gripes with it though, is that the built-in functionality to export your slides to a set of images gives a very, very, poor result. The exported images all seem blurry, even when set to the highest setting.

~

Thankfully, Keynote can perfectly export to PDFs just fine. With that as a universal format, it can easily be converted to a set of images. To achieve the latter, I used pdftoppm which is part of the Poppler PDF rendering library. On Mac, Poppler can be installed using Homebrew:

brew install poppler

With Poppler installed, my procedure to convert a Keynote presentation to a set images looks like this:

  1. Make presentation in Keynote
  2. Export presentation to PDF using Keynote’s built-in “Export to PDF” functionality
  3. Convert the PDF to a set of images with pdftoppm:
    pdftoppm -png -progress presentation.pdf image

There’s a bunch of other options you can pass into pdftoppm, such as the ability to limit which pages you want to convert, sizing options, JPG compression settings, etc. To know which ones you can use, invoke pdftoppm -h

~

For comparison, here’s two exports. The first one using Keynote’s “Export to Images” functionality, the second one using pdftoppm.

Slide exported using Keynote’s built-in functionality
Keynote’s built-in “Export to Images”
Slide exported using pdftoppm
pdftoppm

The pdftoppm one is much better, right?

~

🔥 Like what you see? Want to stay in the loop? Here's how:

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Unless noted otherwise, the contents of this post are licensed under the Creative Commons Attribution 4.0 License and code samples are licensed under the MIT License

Join the Conversation

1 Comment

Leave a comment

Leave a Reply to Jesse Dobbelaere Cancel reply

Your email address will not be published.

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