jsPDF: an HTML5 Solution to Creating PDFs
jsPDF: an HTML5 Solution to Creating PDFs
Join the DZone community and get the full member experience.
Join For FreeAccess over 20 APIs and mobile SDKs, up to 250k transactions free with no credit card required
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
#1 for location developers in quality, price and choice, switch to HERE.
Published at DZone with permission of Paul Underwood , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
{{ parent.title || parent.header.title}}
{{ parent.tldr }}
{{ parent.linkDescription }}
{{ parent.urlSource.name }}