Keynotifying PDF presentations

Update: (03/01/12) My version of pdf2odp.py now converts movies and Impress can actually play them. See this post for details.
Confession time: I did my defence on daWuzzzz's MacBook. The first reason was that I already had an Apple remote, the second was Keynote's excellent presenter console.
The downside was having to import my LaTeX/Beamer PDF presentation as images into Keynote and fiddling around with movie positioning afterwards.
You can do something like that purely on Linux - excluding the Apple remote :-) - so this post covers 3 topics:
  • the PDF presenter console
  • a harangue on crappy vector graphics import in OpenOffice and its presenter console
  • using python scripts to convert PDF into ODF with page images
If you have a not too long PDF presentation without movies, the PDF presenter console looks pretty promising. It provides a slide and next slide preview, a timer and a page counter: timer and active screen are configurable from the command line invocation. No slide browser or notes view, though. In case of movies it should be possible to use the mplayer workaround. What bugged me most was the incredible prerendering time - loading page images of an 28 page presentation into memory froze Medusa (i5-450M, 4GB RAM) for several minutes. Prerendering can be disabled with the -c option, but then slide transitions take rather long.

Another option along the lines of the Keynote import workaround would be to use Open Office's presenter console extension  (openoffice.org-presenter-console from Ubuntu universe, or OOO's extension page) . I tried direct PDF import (openoffice.org-pdfimport, extension page), which was gruesome: the files had to be linearised first (pdftk file1.pdf output file2.pdf) and the imported slides preserved neither fonts nor images. Converting to SVG with pdf2svg and trying libreoffice's SVG import was not much better - this time I got images but a completely messed up page. The presenter console, however, merits some effort, with previews, timer, slide browser and note view.

The last remaining option was to convert the PDF into PNG page images and have them converted to ODP by a python script. I found the excellent pdf2odp script by yc, which edits an ODP template file and has no external dependencies except Imagemagick and zip. I made some small changes (mainly running ghostscript and convert separately, which generates smaller file sizes, see here), the result of which you can download here.
As I had previously found this odfpy photoalbum example, I decided to adapt it for PDF slides (download here) with some inspiration from yc's version. No template file necessary, but additionally dependent on the odfpy module (if you have python-setuptools installed, get it with easy_install odfpy). Usage: pdf2odp.py -w <width> -d <density> <filename>.pdf or pdf2odp.py -h for help.


DaWuzzzz said...

As to the Apple Remote: if your laptop has an infrared port I darkly remember, that LIRC is able to catch the Apple Remote signal and to convert it into keyboard strokes, so you even might end up with a complete KeyNote replacement.

avocadohead said...

...or just use a WiFi/bluetooth remote on an iPod touch or a smartphone. To be honest, I still have to get those working on Linux.
Another issue is that movie playback with openoffice/Linux sucks (agh, not that again...)
I'll just root for an Okular presenter console plugin, I suppose.

Jakob Westhoff said...

The newest version of the PDF Presenter Console (2.0) does the mentioned prerendering a lot more intelligently. Using a different synchronization technique. Flipping through slides while others are prerendered is now almost as fast as switching between them with prerendering disabled. Therefore you can start your presentation while the prerendering is still in progress. At the moment it is finished everything should be blazing fast.

This allows to have the best of two worlds: Normal flipping times during prerendering as well as blazing fast switches after it is done.


avocadohead said...

That's good to know, thanks for commenting, Jakob. Did I download an old version by mistake or is that a recent development?

avocadohead said...

For the sake of completeness: PRemotedroid is a nice bluetooth remote mouse app working excellently on linux, if you have an Android phone.