Four-up PDF slides from Slidy

[9 December 2009]

For the last few years, I’ve been using Dave Raggett’s tool HTML Slidy to prepare slides for presentations. This has a number of advantages: the slides can live happily on the Web, each slide has a distinct URI so they are easy to point at for purposes of discussion, etc., no proprietary slide format is involved, and I can write the text of the slides in TEI Lite.

From time to time, though, organizers of conferences or other gatherings where I speak ask for a PDF copy of my slides. It’s easy enough to print the slides from Slidy, but the result has generally been disappointing to the organizers, who are sometimes a bit distressed (or am I only projecting?) that my slides are so unlike everyone else’s.

So I generally try to coax my system into producing PDF pages with four slides on a page, preferably in little rectangles, so my slides look a little more like the conventional idea of a PDF dump of a slide set. The need arises seldom enough that I always forget how I did it last time. But sorting through some papers just now, I found that the last time I did this I took notes for the future. If I leave the notes only on paper I’ll never find them again when I want them. So, for the record, this is one way to make four-up slides in PDF from Slidy.

  1. In the HTML file, wrap the table of contents in a <div class='toc'>.
  2. Also make sure the header refers to a print stylesheet. (This ought to be generated by my translation from TEI Lite to HTML Slidy, but it wasn’t the last time I did this.) That is, make sure the header contains something like <link rel="stylesheet" type="text/css" media="print" href="" />. This forces a new page for each slide. Not all browsers respect the media attribute, so you may need to try multiple browsers; I have had good results from Opera in this regard.
  3. In the browser’s page setup (or print dialog, wherever the browser puts it), disable the printing of headers and footers (except for page numbers, if you want them).
  4. In the print dialog box, when using Opera, I also find it helpful to check the Fix to paper width option. Backgrounds don’t seem to work, so I also tell Opera to print no background. (This too has troubled some organizers, but I can’t help them.)
  5. Still in the print dialog box, on Mac OS X, select the ‘Layout’ options and choose 4 pages per sheet, with the appropriate Z-shape layout of the sequence, with single thin line borders (or hairline — I haven’t noticed any difference in the output between the two choices). I have managed this on Windows as well, in the dim past, but I don’t remember how I got to the menu that let me select 4-up printing.

It’s helpful to preview the thing for bad page breaks, so you can insert forced page breaks or fiddle with the font size until you get better breaks, but I have no algorithm for this, just fiddle and check until you are satisfied or out of time. Sometimes Firefox has given me better page breaks than Opera, sometimes the reverse; dunno why.