简体   繁体   English

使用单选按钮和复选框从HTML生成PDF

[英]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. 目前,jspdf方法仅显示内容和图像,但如何包含单选按钮图标。

 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. 我想在pdf中包含收音机和复选框图标。

JS FIDDLE JS FIDDLE

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. 好吧,嗯,如果这个列表可以信任,则不支持,因为支持的HTML功能列表根本不包含任何输入元素。

Documentation 文档

>

All Supported HTML features 所有支持的HTML功能

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM