Unfortunately I cannot share the final code but I can share where I start and I'm sure you can complete it
So, take the code below, save it in an HTML, run it, and click on
Generate PDF using jsPDF
Simon
<!DOCTYPE html>
<html>
<head>
<script src="
https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js"></script>
<script>
function generatePDF() {
var pdf = new jsPDF({
orientation: 'p',
unit: 'mm',
format: 'a5',
putOnlyUsedFonts:true
});
pdf.setFontSize(15);
pdf.text("Invoice Group #", 90, 20);
pdf.setFontSize(10);
pdf.text("Samsung",30, 20);
pdf.text("3655 North First Street", 30, 25);
pdf.text("San Jose, CA 95134", 30, 30);
pdf.text("United States", 30, 35);
pdf.text("Bill Address",20, 50);
pdf.text("One Verizon Way", 20, 60);
pdf.text("Basking Ridge", 20, 65);
pdf.text("New Jersey, NJ, 07920", 20, 70);
pdf.text("United States", 20, 75);
pdf.rect(84,55,25,7);
pdf.text("Amount Paid",85, 60);
pdf.rect(109,55,30,7);
pdf.text("$0.00",120, 60);
pdf.rect(84,62,25,7);
pdf.text("Amount Due",85, 67);
pdf.rect(109,62,30,7);
pdf.text("$2,688.00",120, 67);
pdf.rect(84,69,25,7);
pdf.text("Amount Due",85, 74);
pdf.rect(109,69,30,7);
pdf.text("$2,688.00",120, 74);
pdf.addPage();
pdf.setFontSize(30)
pdf.text(20, 20, 'The second page');
pdf.save('jsPDF_2Pages.pdf');
// window.open("jsPDF_2Pages.pdf", '_blank');
}
</script>
</head>
<body>
<button onclick="generatePDF()">Generate PDF using jsPDF</button>
</body>
</html>