A webpage that can render itself in PDF?
During a recent blog reading session, I stumbled upon some information about jsPDF. It’s basically a nifty JavaScript API that can generate PDF documents. It works by manually creating a base64 encoded datauri. What this means is that modern web browsers like Chrome, Firefox and Safari can create PDF documents on the client side.
I had a cool idea for a useful project that I don’t believe yet exists. I thought it would be awesome to progressively enhance (in a browser that supports datauri) an html page to show a link that would render the text in the current page in PDF, ready for efficient paper saving printing. I can see such a project being useful for resumés, shopping lists, bills and receipts.
So I created a prototype and started up a new github project http://github.com/kezakez/PDFRender
If you haven’t heard about github, it is free source control in the cloud with the killer feature of being able to reference code to the line number via URL. Exciting stuff!