cancel
Showing results for 
Search instead for 
Did you mean: 

Downloading the html content as the PDF format?

former_member126637
Discoverer
0 Kudos

Hi Team,

I have a requirement to download the custom and dynamic html content in pdf format. I could able to achieve that using the html2pdf plugin. But my custom html content has a small font size with some kind of complex structure. So more css effects of this, html2pdf is not behaving as expected to download the html content.

Below is the code I am using to download the content.

var opt = { margin: 1, filename: 'ontract.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2 }, jsPDF: { orientation: 'portrait' }, pagebreak: { mode: 'avoid-all', after: '.avoidThisRow' } }; html2pdf().from(element).set(opt).toPdf().get('pdf').save();

Could you please give us some light on this issue.

Thanks & Regards,

Nagaraj

Accepted Solutions (0)

Answers (0)