Forum Feature requests


Is there any chance Prince will support the CSS3 text-shadow property anytime soon?
I think we will need to support SVG filters first to get the blurring/shading effects necessary for making text-shadow look good.
Is that a yes, no or maybe Mike?

Surely, browsers supporting text-shadow (Safari is the only one I'm aware of) aren't using SVG to render the effect. I have no idea though.

There are some javascript options out there, but they seem heavy for a superficial effect.
It means we will support it, but not just yet. :)

The text-shadow property takes four values: the color, the position x and y offsets, and the blur radius. It's easy for us to support the first three, as this only involves writing the text again in a slightly different position and with the specified color. However, blurring the text takes more work, as there is no easy way to blur things in PDF files. This is the reason we don't yet support blur filters in SVG either. The solution for both of these features is the same: we need to render it to an image within Prince and perform the blurring ourselves, then save this image in the PDF file. This will work, but is a lot more effort than it looks like for what should be a relatively simple feature, and also raises new questions, like what resolution should the image be, and will it bloat the PDF file if we make it too big. Browsers do not have this problem as they render everything to an image anyway in order to display it on the screen, and for Safari it's simply a matter of calling the blur function that is built-in to MacOS X (in CoreImage, I think?). So that's the long explanation! :D
Thanks for the detailed reply Mike. If there's one thing I've learned about software development, it's that nothing is as simple as it seems.

Personally, I'd be happy to have the text-shadow functional minus the blur radius, until a time that you are able to support it.
I'm also looking for the text-shadow feature.
Anybody found a convincingness solution to add blur effect around any text ?