Seeking assistance regarding adding spacing between page breaks within an HTML table to accommodate a page number at the bottom of each page. Below, I have depicted my current setup and what I aim to achieve. Is it feasible with the html2pdf library?
https://i.sstatic.net/UOOah.png
Review of my code:
function download_pdf() {
var element = document.getElementById("invoice_body");
var document_name = document.getElementById("txtFileName").value;
var opt = {
margin: [0, -0.1, 0, 0],
filename: document_name + ".pdf",
image: { type: "jpeg", quality: 1 },
pagebreak: { avoid: "tr", mode: "css", before: "#nextpage1" },
html2canvas: { scale: 4, useCORS: true, dpi: 192, letterRendering: true },
jsPDF: { unit: "in", format: "a4", orientation: "portrait" },
};
html2pdf().set(opt).from(element).save();
}
Any suggestions on modifying the code to introduce spacing both before and after page breaks, as well as integrating page numbers?