News for hackers. Stuff that matters.
Re:JsPDF generates PDF documents using pure JavaScript by nreece on Wednesday April 22, 2009 @08:30PM (#574856)
Re:JsPDF generates PDF documents using pure JavaScript by invisible on Wednesday April 22, 2009 @11:59PM (#575061)
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!
Re:JsPDF generates PDF documents using pure JavaScript by ciupicri on Thursday April 23, 2009 @06:36AM (#575360)
The trick consists in generating a data:application/pdf;base64 URL, which unfortunately can't be too long for practical reasons.
Re:JsPDF generates PDF documents using pure JavaScript by qeorge on Wednesday April 22, 2009 @08:39PM (#574869)
That's really impressive. The syntax seems very similar to FPDF, which is great.
Re:JsPDF generates PDF documents using pure JavaScript by chanux on Thursday April 23, 2009 @07:17AM (#575386)
Good one. Off to think what are the practical uses
Re:JsPDF generates PDF documents using pure JavaScript by gourneau on Wednesday April 22, 2009 @11:09PM (#574996)
I should have not been, but I was startled that this could be done with js alone.
Re:JsPDF generates PDF documents using pure JavaScript by tezza on Thursday April 23, 2009 @09:01AM (#575477)
Do away with JS and just use Java

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

Re:JsPDF generates PDF documents using pure JavaScript by arnorhs on Wednesday April 22, 2009 @09:15PM (#574897)
wow, very impressive. What about images and such?
Re:JsPDF generates PDF documents using pure JavaScript by jonursenbach on Wednesday April 22, 2009 @09:30PM (#574908)

        var putImages = function() {
                // TODO
        }
Doesn't look like it supports images yet.
Re:JsPDF generates PDF documents using pure JavaScript by ajm on Thursday April 23, 2009 @09:20AM (#575510)
Re:JsPDF generates PDF documents using pure JavaScript by zackattack on Wednesday April 22, 2009 @08:43PM (#574873)
This is pretty freaking awesome. Unfortunately when I click "Run Code" on the demo, it doesn't open/properly save, using Firefox.
Re:JsPDF generates PDF documents using pure JavaScript by jlangenauer on Thursday April 23, 2009 @03:12AM (#575237)
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.
Re:JsPDF generates PDF documents using pure JavaScript by fiaz on Thursday April 23, 2009 @08:47AM (#575457)
Does it work in Rhino? This would be very handy to embed in some Java apps.