Closed djanesch closed 6 years ago
Have you tried the html2pdf.bundle.js?
declare var html2pdf: any; ` const element = ele.nativeElement; const opt = { margin: 0, filename: filename, image: { type: 'jpeg', quality: 1 }, html2canvas: { scale: 3, letterRendering: true, useCORS: true}, jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait', pagesplit: true} };
// New Promise-based usage:
const worker = html2pdf().from(element).set(opt).save()
.then(done => {
this.loader = false;
});`
@sameerpallav thanks for your code. seems to work perfectly. 1 step with adding to angular-cli.json was not needed in my case.
@eKoopmans hi Can you please tell me the solutions for repeating table header every page and extra blank page show issue
@eKoopmans i have troubles getting html2pdf running with jsPDF in angular5. so far i have done following steps:
the code where i want to create pdf looks like:
maybe you could give me a clue whats wrong. if i run the application i get the following error: