updated width

This commit is contained in:
Luis Aleixo 2021-08-18 15:45:53 +02:00
parent 8ff84963f2
commit b7276d4714
2 changed files with 6 additions and 1 deletions

View file

@ -4,6 +4,7 @@
bottom: 20px;
right: 20px;
padding: 20px;
min-width: 1300px;
}
h1 {

View file

@ -2,12 +2,16 @@ window.onload = function() {
document.getElementById("download-pdf")
.addEventListener("click", () => {
const pdf_version = this.document.getElementById("body");
const button = this.document.getElementById("download-pdf");
button.style.display = 'block'
console.log(pdf_version);
console.log(window);
var opt = {
margin: 0,
filename: 'myfile.pdf',
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2, letterRendering: true },
html2canvas: { scale: 2, letterRendering: true, width: 1300 },
jsPDF: { format: 'a4', orientation: 'portrait' },
};
html2pdf().from(pdf_version).set(opt).save();