A library to generate PDFs in client-side JavaScript.
You can catch me on twitter: @MrRio or head over to my company's website for consultancy.
The easiest way to get started is to drop the CDN hosted library into your page:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.debug.js" integrity="sha384-CchuzHs077vGtfhGYl9Qtc7Vx64rXBXdIAZIPbItbNyWIRTdG0oYAqki3Ry13Yzu" crossorigin="anonymous"></script>
Integrity-hash generated by https://www.srihash.org/
or can always get latest version via unpkg
<script src="https://unpkg.com/jspdf@latest/dist/jspdf.min.js"></script>
Using yarn:
yarn add jspdf
Using npm:
npm install jspdf --save
Then you're ready to start making your document:
// Default export is a4 paper, portrait, using milimeters for units
var doc = new jsPDF()
doc.text('Hello world!', 10, 10)
doc.save('a4.pdf')