3 ms·
JsPDF generates PDF documents using pure JavaScript
- nreece 18y agoHere's a basic example: http://jspdf.googlecode.com/svn/trunk/examples/basic.htm http://jspdf.googlecode.com/svn/trunk/examples/basic.htm
- qeorge 18y agoThat's really impressive. The syntax seems very similar to FPDF, which is great.
- zackattack 18y agoThis is pretty freaking awesome. Unfortunately when I click "Run Code" on the demo, it doesn't open/properly save, using Firefox.
- jlangenauer 18y agoIt 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.
- fiaz 18y agoDoes it work in Rhino? This would be very handy to embed in some Java apps.
- arnorhs 18y agowow, very impressive. What about images and such?
- jonursenbach 18y agovar putImages = function() { // TODO } Doesn't look like it supports images yet.
- ajm 18y agoVerified by http://code.google.com/p/jspdf/issues/list http://code.google.com/p/jspdf/issues/list
- deleted 18y ago[deleted]
- gourneau 18y agoI should have not been, but I was startled that this could be done with js alone.
- invisible 18y agoI 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!
- ciupicri 18y agoThe trick consists in generating a data:application/pdf;base64 URL, which unfortunately can't be too long for practical reasons.
- chanux 18y agoGood one. Off to think what are the practical uses
- tezza 18y agoDo away with JS and just use Java http://www.lowagie.com/iText/ http://www.lowagie.com/iText/