I am trying to generate a PDF document via jsPDF which has enough content to fill out 2-3 A4 pages. The problem here is that jsPDF cuts off the content after the first page, not generating any of the further pages.
<script type="text/javascript">
var doc = new jsPDF();
var options = {
pagesplit: true
};
var specialElementHandlers = {
'#editor': function (element, renderer) {
return true;
}
};
$('#SavePDFbutton').click(function () {
doc.fromHTML($('#timeline').html(), 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers
});
doc.save('<?php echo $_SESSION['Holidex']; ?>-DM-Logbook.pdf');
});
</script>
I have been playing around the the pagesplit
option, but without success. What am I doing wrong here?
Thanks
doc.fromHTML($('#timeline').html(), 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers,
'pagesplit':true
});
can you try with the parameters above?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.