type here
Hi I want to convert html to pdf in angular using jspdf and send to nodejs server
Can anyone help me?
Or give me advice please
I have this code saved in the browser and I want to send it to the nodejs server
public openPDF(): void {
let DATA: any = document.getElementById('content');
html2canvas(DATA).then((canvas) => {
let fileWidth = 208;
let fileHeight = (canvas.height * fileWidth) / canvas.width;
const FILEURI = canvas.toDataURL('image/png');
let PDF = new jsPDF('p', 'mm', 'a4');
let position = 0;
PDF.addImage(FILEURI, 'PNG', 0, position, fileWidth, fileHeight);
PDF.save();
});
}