1
我想導出我的HTML代碼到PDF的一部分,爲了這個,我現在用的是下面的代碼:導出HTML + CSS來PDF使用Javascript
<script language = "JAVASCRIPT">
var doc = new jsPDF();
var specialElementHandlers = {
'#editor': function (element, renderer) {
return true;
}
};
$('#download').click(function() {
doc.fromHTML($('#mytable').html(), 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers
});
doc.save('sample-file.pdf');
});
</script>
,但它不支持CSS ..如何我可以用它的風格導出它嗎?
[用jspdf不導出CSS導出PDF]可能的副本(http://stackoverflow.com/questions/25946275/exporting-pdf-with-jspdf-not-rendering-css) –