Hacker News new | past | comments | ask | show | jobs | submit login
JsPDF generates PDF documents using pure JavaScript (code.google.com)
76 points by nreece on April 23, 2009 | hide | past | favorite | 13 comments




I love that they use data: and I've never thought to do that for something as simple as a PDF (which can be really simple). Kudos to the developers!


The trick consists in generating a data:application/pdf;base64 URL, which unfortunately can't be too long for practical reasons.


That's really impressive. The syntax seems very similar to FPDF, which is great.


Good one. Off to think what are the practical uses


I should have not been, but I was startled that this could be done with js alone.


Do away with JS and just use Java

http://www.lowagie.com/iText/


wow, very impressive. What about images and such?


        var putImages = function() {
                // TODO
        }
Doesn't look like it supports images yet.



This is pretty freaking awesome. Unfortunately when I click "Run Code" on the demo, it doesn't open/properly save, using Firefox.


It works for me in Google Chrome (though you hope it would). I'm continually astounded at what can be achieved in Javascript... Will have to have a look at the source tonight and see what I can learn.


Does it work in Rhino? This would be very handy to embed in some Java apps.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: