eKoopmans / html2pdf.js

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

1-page PDF is blank when file size is greater than c.3.1MB #698

Open AlexCT22 opened 1 week ago

AlexCT22 commented 1 week ago

I'm creating a simple 1-page PDF with the following custom dimensions:

The PDF contains some text and an image.

Everything works fine when the scale value is set to 9. The output PDF has a file size of 3.1MB. But when the scale value is set to 10 ,(i.e. the file size is slightly bigger) I get a completely blank PDF.

I do not believe this is related to the well-known max width/height canvas issue as the PDF is created successfully when the scale value is set to 9 or lower.

Just wondering if anybody else has run into this issue or may have some idea of what's going wrong?