support for svg mix-blend-mode: multiply
it's now supported in chrome, but it's new. any chance it can be supported here?
chrome:
pdf:

Hello!
Thank you for this feature request. As many blend modes are supported in PDF (including multiply), we can imagine that this feature could be implemented. Of course, having the feature in PDF doesn’t mean that it’s easy to implement :smile:, but at least it’s a good start!
I'm mostly a designer who codes some. is there anything else I can do to be helpful on something like this?
I'm mostly a designer who codes some. is there anything else I can do to be helpful on something like this?
Thanks a lot for your help!
The first steps are not really fun and require some ability to focus on a specification, but that where I’d start:
- download the PDF specification,
- be sure that Blend modes (chapter 11.3.5) are what we want,
- find where the blend mode key has to be inserted in the PDF,
- find where the key has to be inserted in WeasyPrint (maybe somewhere here?),
- insert the
Multiplykey in the code and check that it works (no need to get themix-blend-modevalue from the SVG, that’s just a test), - get the real
mix-blend-modevalue from the SVG and make it find its way to the place where it has to be inserted in WeasyPrint.
TL;DR: find a PDF sample in the spec where the Multiply (or any other) blend mode is set, try it in WeasyPrint’s code. If it works, make WeasyPrint use the real mix-blend-mode value instead of forcing Multiply. The first step could be complicated, but doesn’t require any coding abilities.
Note that SVG’s feBlend is supported. Having mix-blend-mode supported in SVG (and actually even in CSS) could actually be quite easy. If anyone is interested in contributing, just ask, we’ll help you!