fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
777 stars 95 forks source link

Add opacity to text #138

Closed JustFrederik closed 1 year ago

JustFrederik commented 1 year ago

could you add an alpha channel to the colors, so rgba instead of rgb?

fschutt commented 1 year ago

I would need to implement softmasks for this as PDF doesn't natively support alpha channels, even with text. Remember that it's not just "alpha", for printing you have to take into consideration blending modes, overprinting, special cases for black / cmyk, etc.

Currently no, sorry.