I use html, javascript and lib html2pdf
How to make pdf files according to class size (html2pdf)
function generatePDF(){ var element = document.getElementById('purchase-paper'); var opt = { margin: 1, filename: 'test.pdf', image: {type:'jpeg',quality:0.98}, jsPDF: {unit:'in',format:'letter',orientation:'portrait'} }; html2pdf().set(opt).from(element).save(); console.log("Test")};
I only want to export pdf 1 page.
Try this: