Estoy tratando de eliminar los espacios en blanco de la página mientras genero pdf desde mi página web html usando jsPDF. Intenté agregar el código de tamaño de página pero no funciona. El código es el siguiente:
<script src="html2pdf.bundle.min.js"></script> <script> function generatePDF() { // Choose the element that our invoice is rendered in. const element = document.getElementById('mypdf'); // Choose the element and save the PDF for our user. html2pdf().from(element).save(); new jsPDF('p', 'mm', [297, 210]); } </script> <button onclick="generatePDF()">Download as PDF</button>Pero aún así, tengo espacios en blanco en el pdf. Cualquier ayuda es apreciada.