Re:Webkit.js
by atomical on Friday June 20, 2014 @09:52PM
(#7923847)
I've been watching this project hoping that eventually PDFs could be rendered on the client.
[ Parent
| on HN ]
You can do that today already using toDataURL() https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasE... to convert canvas to image and then use jsPdf http://parall.ax/products/jspdf to convert that image to pdf
Is this a big needed feature? It's actually really easy to pull of, cairo's backend can be switched from using images to svg, to pdf's. It's just switching the backend and once the renderer is done just spit out the results.
Add it as a feature request on github and i'll add it to the api.