jsPDF is a library to generate PDF files using Javascript. It can work both client side or server side. See the examples folder.

You must run the Downloadify example using a webserver due to Flash restrictions.