I want to use jsPDF.html to convert html page to pdf, and I\'m using this code:
savePdf () {
var pdf = new jsPDF({u
Following the previous anser by ptidus, this should work:
saveAsPdf() {
window.html2canvas = html2canvas;
var doc = new jsPDF(
'p', 'pt', 'a4'
);
doc.html(document.querySelector("body"), {
callback: function(pdf) {
pdf.save("cv-a4.pdf");
}
});
}
There is something off with the margins probably, but I didn't explore that too much. You will also notice that the generated PDF is actually text and not an image.
code example