I'm generating vouchers using the html2pdf library.
This works fine with the voucher showing as HTML in the page.
I have a button that triggers the html2pdf()
function on click, prompting the user to accept the PDF download.
I would like for the HTML to not show on the page. I tried applying position: absolute;
and placing the HTML away from the user's sight. Unfortunately, the PDF then renders as blank.
Is there a way to achieve this ?