One of the ikiwiki plugin I'd like to see happen is something to automatically share pdf slides. I don't want to put my slides in some non-free flash stuff, of course. I searched for a good solution quite extensively, and here is how I currently do. I'm well aware that this is perfectly improvable, but here we go anyhow. That's a modified version from John Resig (ejohn.org).
First of all, I have a script which converts the pdf into a serie of png files. This should be trivial, but I had to tweak a bit to get a decent resolution in the produced image. I request convert (from imagemagic) to convert the pdf to a file being 4 times too big, and then I scale it down by half to get both the size I want and a good resolution. Since the process is quite long, I cache the files to not produce them when they already exist.
NUM=`pdfinfo ${PDF} |grep Pages|sed 's/[^0-9]//g'` error=0 for n in `seq 0 $NUM`; do if [ x$n != x$NUM ] ; then # lame. should iterate over [0,NUM-1] properly m=`expr $n + 1` echo -n "Page $m of $NUM... "; file=${PNGDIR}_`printf %03d $m`.png if [ ! -e $file ] || [ $file -ot ${PDF} ] ; then convert -density 400% "${PDF}[$n]" -resize 50% $file || error=1 echo "converted" else echo "kept previous version" fi fi done if [ x$error != x0 ] ; then exit 1; fi
Afterward, I just have to put some javascript in the page to display the right image at the right time. There is some code in the script, but actually I don't use it. It seems that firefox don't like to have an included js file which refers to a div block in another file (or something like this). The thing is that I never managed to get it working if the script is not directly inlined in the page. So, since I never feared being ridiculous, I copy paste and adapt the script from page to page when I export a pdf.
That's mega-lame and I should probably feel ashamed, but I thought I share my way of exporting slides right now instead of waiting for a fix and never actually publish it.
A possible improvement (beyond integrating it properly into ikiwiki) would be to automatically extract the plan to produce stuff like what I did manually here, but that's in a far far future only, I'm affraid.