let page = document.getElementById("divToPrint");
html2PDF(page, {
jsPDF: { unit: "pt", format: "A4", orientation: "portrait" },
imageType: "image/jpeg",
output: "./pdf/generate.pdf",
});
let input = document.getElementById("divToPrint");
html2canvas(input)
.then((canvas) => {
const imgData = canvas.toDataURL('image/png');
const pdf = new jsPDF();
pdf.addImage(imgData, 'PNG', 0, 0);
pdf.save("download.pdf");
});
;