Reputation:
Currently jspdf method shows only content and images, but how to include radio button icons as well.
var doc = new jsPDF();
var specialElementHandlers = {
'#editor': function (element, renderer) {
return true;
}
};
$('#cmd').click(function () {
doc.fromHTML($('#content').html(), 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers
});
doc.save('sample-file.pdf');
});
<div id="content">
<input type="radio">CT Scan
</div>
<div id="editor"></div>
<button id="cmd">generate PDF</button>
I want to include radio and check box icons in pdf.
Upvotes: 8
Views: 2414
Reputation: 773
Well, erm, if this list can be trusted it's not supported, as the list of supported HTML features doesn't include any input elements, at all.
>
Upvotes: 4