-
-
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
Support color profiles #844
Comments
Cairo (the library used in WeasyPrint to generate PDF and PNG files) doesn't support CMYK. Here's a sad post about it, it's old but still relevant. |
Perhaps we could tackle this by converting the colour space after generating PDFs? I've seen an approach on this here: https://github.com/johndoe31415/pdfminify/blob/master/llpdf/filters/PDFAFilter.py This might help us making some progress on this ticket as well: #630 |
Yes, we can do that, but only if we use colors that can have a RGB representation in a bijective way (as we'll have to use cairo at one moment, and cairo can only store RGB colors).
pdfminify? What an interesting project, wow. You're right, it may be really helpful. |
Related to #1091. |
Is there any update on this issue? |
Now that we use our own PDF generator, it could be possible to support more features about color profiles. That’s not planned for the next milestones, but it may be in the future. |
Could you point to the relevant code sections where CMYK support would fit? |
That’s a very good question. I don’t know the PDF specification well enough to know how to generate a PDF with color profiles, so it’s pretty hard to tell where the relevant code is… |
Hello! As it’s soon our 2-year anniversary as CourtBouillon, we opened a short survey to know more about your expectations. The survey will be opened until October 10th. Update: the survey is now closed. You can find the results here. |
Hey, I just looked at the survey results and color profiles seem relevant, but not at the absolute top of the list. So my question is, is there anything planned regarding this? |
Hi @TellersFella! As you have seen with the survey results, color profiles are not our top priority. However, there has been two interesting steps recently:
When Color 4 is fully implemented, we will be able to work on the next step: support ICC-based colors in WeasyPrint for CSS (and for images…). With that, we should be able to handle everything that can be done with color profiles in PDF files. Note that supporting naive CMYK colors directly in CSS will require to support CSS Color Module Level 5. |
Hello @liZe, i just wanted to ask if there is any new updates regarding implementation of ICC-based colors or any CMYK conversion in Weasyprint? Best regards, |
Yes, some work has been done, but we’re not close to a proper CMYK support in WeasyPrint yet. What we’ve been working on is the support of CSS color level 4 in tinycss2. This feature will enable the possibility to define non-RGB colors using CSS. The work is not merged yet (mainly because we’ve got a lot of work on other parts of WeasyPrint), but hopefully most of the code is already written. Tests and ideas to solve the latest missing features are welcome! The next step is to include this support in WeasyPrint. It means that we’ll have to manipulate abstract colors instead of RGB colors everywhere, and that we’ll have to write the correct PDF data according to the space of the color. Images are another topic we have to take care of. That’s not done at all. And we didn’t even talk of ICC and CMYK yet! These features are possible with CSS color level 5, thanks to |
Hello! As you may know, two weeks ago was CourtBouillon 3-year anniversary 🎉. For this occasion, we prepared a short survey to have your opinion on this year’s features and to know what you’d like to see in the future! The survey is opened until November 19. |
Is there a way to change the colour profile to CMYK? Whilst it's easy to use PIL for jpgs, I haven't found a way to do it for entire PDFs.
There will be cmyk() support in CSS4, but that's still some time to go: https://www.w3.org/TR/css-color-4/#cmyk-colors
The text was updated successfully, but these errors were encountered: