eKoopmans/html2pdf.js

Render only what on the screen but not overall

NoroleakIng opened this issue · 1 comments

When I download to pdf, it's able to get or render what shows on the screen but not all, and everything else after that is blank. Is there any solution to this?
html2pdf(document.getElementById('export-to-pdf'), { filename: 'download.pdf', margin: 5, })

Found the solution by using windowHeight.
html2pdf(document.getElementById('export-to-pdf'), { filename: 'download.pdf', margin: 5, html2canvas: { scale: 5, imageTimeout: 15000, logging: true, useCORS: true, allowTaint: true, letterRendering: true, height: window.outerHeight + remainingHeight, windowHeight: window.outerHeight + remainingHeight, }, pageBreak: { mode: ['avoid-all', 'css'] }, })