Ads

Sunday, 20 July 2014

jsPDF – Generate PDF Files in JavaScript

Download   Demo


jsPDF



A HTML5 client-side solution for generating PDFs. Perfect for event tickets, reports, certificates, you name it!


About jsPDF



Simply include the jsPDF library in your <head>, generate your PDF using the many built-in functions, then hook up a button to trigger the download. All the examples here use jQuery.


Browser Compatibility



jsPDF will work in IE6+*, Firefox 3+, Chrome, Safari 3+, Opera. For IE9 and below, we lazily load a Flash shim called Downloadify which enables the files to be downloaded. (Current build does not have IE6-9 shim enabled)


Creating your first document


See examples/basic.html. There’s a live editor example at index.html.



var doc = new jsPDF();
doc.text(20, 20, 'Hello world.');
doc.save('Test.pdf');


Head over to jsPDF.com for details or here for our most recent live editor and examples.


Checking out the source



git clone --recursive git://github.com/MrRio/jsPDF.git



 



 




jsPDF – Generate PDF Files in JavaScript

1 comment: