I have a page showing a list of "selected" members with "ranks" and "year" and I want it to a pdf without showing the buttons.
How can I generate such a PDF without losing the style?
I've tried using plain jsPDF but it returns only some values but not (select) tags
<?php
echo '<script>';
echo 'function onClick() {';
echo "var pdf = new jsPDF('p', 'pt', 'letter');";
echo 'pdf.canvas.height = 72 * 11;';
echo 'pdf.canvas.width = 72 * 8.5;';
echo "pdf.fromHTML($('.matrikule').get(0), 10, 10, {'width': 180});";
echo 'pdf.save("test.pdf");';
echo '};';
echo 'var element = document.getElementById("clickbind");';
echo 'element.addEventListener("click", onClick);';
echo '</script>';
?>
Refer to the screenshot beneath
I want the PDF to show exactly the way it's on web page. Is this only achievable with html2canvas?