Converting S5 slides to a single PDF on Mac OSX

Using a combination of webkit2png and a custom Automator workflow.

I used S5 in combination with Webby for my Ruby & Cocoa presentation at RubyManor. I hate PowerPoint with a passion and haven’t done enough presentations to be bothered to learn KeyNote. So I was much happier generating my slides from a plain text file marked up in Textile.

However, like Paul Battley, I found that S5 doesn’t work so well when someone wants to take those slides and put them in a video. Anyway, I’ve managed to convert my S5 slides into a single PDF using a combination of webkit2png and a custom Automator workflow :-

Ruby Script using webkit2png

#!/usr/bin/env ruby

NUMBER_OF_SLIDES = 94
SEQUENCE_FORMAT = "%0#{Math.log10(NUMBER_OF_SLIDES).to_i}d"
HOST = "jamesmead.local"
PATH = "/talks/2009-12-14-ruby-and-cocoa-at-ruby-manor/"
BASE_URL = "http://#{HOST}#{PATH}"

(0...NUMBER_OF_SLIDES).each do |index|
  anchor = "#slide#{index}"
  url = "#{BASE_URL}#{anchor}"
  sequence = SEQUENCE_FORMAT % index
  puts %x[webkit2png --fullsize --filename=slide-#{sequence} #{url}]
  raise unless $?.success?
end

Custom Automator Workflow