Over a million developers have joined DZone.
Platinum Partner

jsPDF: an HTML5 Solution to Creating PDFs

· Web Dev Zone

The Web Dev Zone is brought to you in partnership with Mendix.  Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.

jsPDF - HTML5 PDF Generator - Parallax

Normally, if you wanted to programmatically create PDFs, you would have to use a server side client, such as PDFLib, FPDF, TCPDF, DomPDF.

Here is an HTML5 client-side solution to creating PDFs called jsPDF.

It comes with a number of features, including:

  • Add images.
  • Add different font faces and change font sizes.
  • Convert HTML to PDF.
  • Add multiple pages.
  • Draw shapes.
  • Convert page layout from portrait to landscape.
  • Split strings to fit text on the page.

Browser Support

Because this uses a Javascript library, it is compatible with all major browsers, including IE6+, Firefox 3+, Chrome 3+, Safari 3+ and Opera.

Try it out on your next project: jsPDF

The Web Dev Zone is brought to you in partnership with Mendix.  Learn more about The Essentials of Digital Innovation and how it needs to be at the heart of every organization.

java,html5,javascript,pdf,tool,tips and tricks,html & xhtml,jspdf

Published at DZone with permission of Paul Underwood , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}