fschutt / printpdf

A fully-featured PDF library for Rust, WASM-ready
https://fschutt.github.io/printpdf/
MIT License
829 stars 98 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.