jsPDF: fromHTML vs addHTML
问题 I'm trying to export an html(within a div with ID), and have managed to do so with fromHTML(), but unfortunately it doesn't read/use any css I have. This said, I tried with addHTML function, but it looks like nothing happens when I use following code: function pdfExport(id) { window.html2canvas = html2canvas; var dddoc = new jsPDF('p', 'px', 'a4'); var elem_to_export = $("#cmodal-id-" + id)[0]; dddoc.addHTML(document.body, function(){ console.log('saving'); dddoc.save('test.pdf'); }); } Also,