-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
"I have read and understood the contribution guidelines.".
I am using jsPDF to convert HTML components into a PDF.
Bellow is the code for that,
var doc = new jsPDF({orientation: 'l',unit: 'px',format: [1250,1100],compress : true});
let component=document.getElementById('document');
doc.html(component,{
pagesplit: true,
margin: [10, 0, 50, 0],
callback: function (doc) {
doc.save("report.pdf");
},
x: 0,
y: 0,
});
The resulting PDF looks like. The resulting PDF looks like.

I expect jsPDF to move the component to the next page whenever its find that the size of the component is bigger than the rest of the current page.
PS: im importing many vue components to convert them to PDF , i've tried to upload the project in jsFiddle but i have many components and the project is big , any solution plz ? im stuck here for more than a week