-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF file size almost double in v53 #1414
Comments
Hello! Could you please share your HTML, CSS and static files used to generate this document? |
The file to convert is the "Relatório.html" with all static files on "Temporary". It appear to be not related with the JPG files, bellow a comparative (+/- temporary folder images and weasyprint version):
Compiling without the "Temparary" images folder I got 3.1MB on v52.5 and 15.4MB on v53.0. The file is a 7z compressed file, I had to change de extension to attach here. |
The problem was caused by images not being deduplicated when they were included in patterns. In your case, the watermark displayed on each page was displayed as a pattern (because it’s a background), and the image was though embedded in the document for each page (+600 times). Thanks a lot for the report and for your sample! |
Confirmed now a reduction of 211kB in the PDF file compared with v52.5. |
I am reporting a issue that is affecting my migrating from WeasyPrint 52.5 to 53.0, as part of the issues on #1412 (fix on #1413): the PDF file almost double the size by using the bellow configurations on a report template example:
Found in https://hildogjr.gitlab.io/unicamp-electric-inventory/ (28.5MB)
(40.6MB) I could not attach the file.
The text was updated successfully, but these errors were encountered: