-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
This method takes html canvas (previously rendered PDF file with other lib) and generates new PDF with bad quality of text:
canvasToBase64Pdf (element, width, height) { const options = { image: { type: 'jpeg', quality: 1 }, html2canvas: { scale: 1 }, jsPDF: { orientation: width > height ? 'landscape' : 'portrait' } } return window.html2pdf() .from(element) .set(options) .outputPdf('datauristring') .then(result => result) }
I tried increasing scale in html2canvas and many other configs of html2canvas and jsPDF options, nothing works well for me. This screenshots show diffrence between quality before (first screenshot) and after (second screenshot) usage of html2pdf. Do you know how can I change my approach in order to achieve better quality ?

