mylloon.fr/static/js/libs/jspdf.js
Mylloon daacc4aa49
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
fix jspdf
2023-04-24 16:19:35 +02:00

14 lines
322 B
JavaScript

window.addEventListener("load", () => {
const { jsPDF } = window.jspdf;
const doc = new jsPDF();
doc.html(document.body, {
width: doc.internal.pageSize.getWidth() - 20,
windowWidth: 800,
margin: [15, 10, 10, 10],
callback: function (doc) {
doc.save(`${document.title}.pdf`);
},
});
});