I have a page in my script which is essentially a consent form. It's a select question with Yes/No code. I've added a button to the bottom of the page to print the page to pdf and it works except it doesn't print the Yes/No radio buttons. Is there a way to include the radio buttons in the pdf file?
In my html head tag I have:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js "></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
And in my footer I have the following:
<button type="button" onclick="downloadPDF()">Download page to PDF</button>
<script type="text/javascript">
window.jsPDF = window.jspdf.jsPDF;
var docPDF = new jsPDF();
function downloadPDF(){
var elementHTML = document.querySelector("#page");
docPDF.html(elementHTML, {
callback: function(docPDF) {
docPDF.save('consent.pdf');
},
x: 15,
y: 15,
width: 170,
windowWidth: 800
});
}
</script>
thanks,
Paul