Vue Simpan Elemen Halaman ke PDF
printFacture() {
var pdf = new jsPDF();
var element = document.getElementById('facture');
var width= element.style.width;
var height = element.style.height;
html2canvas(element).then(canvas => {
var image = canvas.toDataURL('image/png');
pdf.addImage(image, 'JPEG', 15, 40, width, height);
pdf.save('facture' + moment(this.facture.date_debut).format('LL') + '_' + moment(this.facture.date_fin).format('LL') + '.pdf';
});
}
CsuBison