Simply include the jsPDF library in your <head>, generate your PDF using the many built-in functions, then hook up a button to trigger the download. All the examples here use jQuery.
jsPDF will work in IE6+*, Firefox 3+, Chrome, Safari 3+, Opera. For IE9 and below, we lazily load a Flash shim called Downloadify which enables the files to be downloaded. (Current build does not have IE6-9 shim enabled)
Big thanks to Daniel Dotsenko from Willow Systems Corporation for making huge contributions to the codebase. Thanks to Ajaxian.com for featuring us back in 2009. Everyone else that's contributed patches or bug reports, you rock.