Thanks for the pointers, tribble. FPDF looks interesting and it doesn't rely on PDFLib which I considered installing (it's a PECL extension). I found another interesting PDF convertor called
dompdf which can directly convert from a HTML template to PDF. Unfortunately it requires PHP 5.x, but we're still running 4.x (I haven't had the guts to upgrade yet).