Closed Dysos closed 2 months ago
Hello! Apologies for the delayed response, and thanks for the kind words.
This library does not convert anything into a PDF. What we do is call window.print
within an iframe that has your content to print.
The PDF is being generated by the browser (Chrome, Firefox, etc). This is likely an issue with how the browser is constructing the PDF.
Thank you very much. I will look into how the browser does this conversion then, to try and reduce the filesize 👌
Please let us know what you find, many folks who use this library are likely interested in this topic!
I'm having some issues with the filesize of the download PDFs when using this library. I've narrowed it down to the usage of the
<img/>
tag - which strangely adds a lot more to the final file size of the PDF than it "should".Changing nothing else in the document to be downloaded, adding a single img tag, pointing to a src with a filesize of 288kB, adds just over 7MB to the size of the downloaded PDF.
Is this an error, or is there something I'm not getting about the conversion from HTML to PDF? Because it seems extraordinarily high.
Otherwise a great library 👌