How to Create Multipage PDF from HTML Using jsPDF and html2Canvas

UPDATE: Some code is modified due to the initialisation of jsPDF code it was creating blank PDF, now I have added setTimeout of 2 seconds, this will initialize code after the page is loaded. I have also added a Demo Link below

 

There are a number of tools which can easily create PDF files from JSON or raw data provided. But in some situations, we have rich UI elements like images and data representation in graphs, so in that case, we may require PDF as it is.

jsPDF and html2canvas are really powerful tools which can help you to convert whole HTML page into multi-page PDF document, which you can show in iFrame or user can even download it.

Continue reading How to Create Multipage PDF from HTML Using jsPDF and html2Canvas