-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
weasyprint generates blurry/opaque image #2131
Comments
Hi, Could you please share your image and your PDF? |
|
There’s no problem when I try to reproduce with your code: Could you generate a real HTML file instead of sharing the template? Maybe there’s something wrong in the generated HTML. The best solution if you want us to reproduce your problem is to produce static HTML and CSS files, and share an archive containing everything (including images) to generate the exact same PDF you’re generating. |
I don’t have the problem when using your files. Do you have the problem with these exact files? |
Yes with these exact files. This is how I generate the pdf:
|
I think it only happens when the graph is on the same page as the cards, like in my pdf. In yours it is on a new page, because your font is a bit smaller. If you increase the height of the div above the cards, they should be on the same page. |
I’m sorry, but please provide an archive with code that’s 100% ready to use, so that we can easily reproduce. 🙏🏽 |
Everything should be in here |
Thank you. Here’s a minimal sample to reproduce: <img src="plots/plot.jpg">
<p style="color: #0001">text</p> |
It’s now fixed and tested, feedback is welcome! |
I don't see any difference. Do I need to reinstall the package to get the fixed version? |
It’s fixed in the main branch, not in the latest release. You can install the current main branch (not in production!) with |
It works. Thank you! |
I am using the weasyprint library to export a pdf based on html and css code. However, it generates very inconsistent images. Sometimes the images look like they are opaque. In this code I generate an image of a histogram twice, where the first image looks opaque and the second looks normal. As you can see on the image below.
HTML:
CSS:
The text was updated successfully, but these errors were encountered: