When using pagesplit: true it always stretches the output in pdf format. Try using the old version of jsPDF with html2canvas of course.
Sharing the results of my 2-day trial to create multi-page PDF generation with addHTML not fromHTML , as it loses CSS rules.
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js"></script>
then the pdf file should be in order:
<script> $(window).on('load', function(){ var pdf = new jsPDF('p', 'pt', 'a4'); var pdfName = 'sample.pdf'; var options = { format: 'JPEG', </script>
Hope this helps. Thanks!
source share