I know this has been asked before but I can't seem to find the answer, how to add page break, my page cut if convert to pdf ..??
html2canvas(document.getElementById("content")).then(function (canvas) {
var img = canvas.toDataURL("image/png");
var doc = new jsPDF({
orientation: "landscape",
format: "a4",
});
doc.addImage(img, "JPEG", 1, 5);
doc.save("testCanvas.pdf");
});
For PDF conversion, use this library instead, it supports break pages :
https://github.com/eKoopmans/html2pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With