user9320601
user9320601

Reputation:

Generate PDF from HTML with radio buttons and checkboxes

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.

JS FIDDLE

Upvotes: 8

Views: 2414

Answers (1)

Jan Andersen
Jan Andersen

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.

Documentation

>

All Supported HTML features

Upvotes: 4

Related Questions