eKoopmans / html2pdf.js

Client-side HTML-to-PDF rendering using pure JS.
MIT License
3.92k stars 1.37k forks source link

Fix it with workable html2canvas version #676

Open LarryMckuydee opened 5 months ago

LarryMckuydee commented 5 months ago

Changes:

Note:

LarryMckuydee commented 5 months ago

Hi @eKoopmans ,

Thank you for developing such an awesome plugin! It has been a huge time-saver for me in calculating page breaks and generating PDFs.

I noticed from your README.md that version v0.10.1 is facing some issues, and the currently available stable version is v0.9.3. However, even in v0.9.3, I've observed some issues with page breaks, particularly overlay problems. Though it's not as severe as in v0.10.1, where it caused blank PDF pages and overlay issues simultaneously.

After hours of debugging, I traced the issue back to html2canvas. The version of html2canvas mentioned above seems to be the best available option for me, providing accurate page breaks and maintaining good image quality.

I won't delve into the details of the features or functions that the latest version of html2canvas may offer, but this version works perfectly for my needs. Feel free to ignore this pull request, as I'm unaware of the future direction for html2pdf, and I understand you may have your own considerations for what will work best.