I'm not sure if you're open to using a front-end library, but I've had decent luck with jsPDF ( http://parall.ax/products/jspdf ).
Admittedly, I'm not very pleased with their documentation.. I had to do a lot of digging through the source to find certain methods. I had a short Twitter conversation with the main developer and he said there's a major revision on its way with some interesting HTML-to-PDF translation capabilities. Hopefully the docs improve.
+1 for wkhtmltopdf, it is specially useful when using a css framework like twitter bootstrap or zurb foundation, the others simply destroy what I preview in the browser.