Forum How do I...?

CSS writing-mode (vertical text without SVG)

arlenb
Hi Mike,

I'm currently using a dynamically generated SVG to provide vertical text for table column headings. It's an ongoing pain, though it does work.

Do you know when you expect to have full support for the CSS3 writing-mode property (so tb-rl and tb-lr work)? This would be super handy.

Here's the documentation on the property (although I'm sure you are familiar): http://www.w3.org/TR/2003/CR-css3-text-20030514/#writing-mode
mikeday
This is on the roadmap, but it is a non-trivial feature, that will take some time to get to. Perhaps the new JavaScript support in 8.0 could make it easier to automatically generate the SVG you are using? That make reduce the inconvenience in the meantime. :)
arlenb
Yeah, I'm sure you are right. Count me in as a voter for it though :) If I had that and on-the-fly photo resizing (from a large original to the correct size for the specified DPI) built in I would be one happy camper.

Should I post this under feature requests (if you use that for reference), or is that unnecessary?
mikeday
It's already on the roadmap, so we will get to it eventually. :)

What exactly do you want to do with images? I would have thought for print output you would just use the highest resolution image that you had available.
arlenb
Great. Thanks for that link too. For some reason I had never looked at the actual roadmap.

We certainly could just use the highest resolution image available, but that generally results in a much larger PDF file size than necessary. The trick is we are not just making these PDFs for internal consumption. We are moving to using Prince to generate our full 40+ page product catalog (product data is being updated daily) for multiple verticals, as well as shorter mini catalogs and sales sheets. All of these need to be available through our website for download and printing.

Right now we're just having to maintain a library of large images (at least as large as the largest we would need at 300dpi) and then using Dragonfly (https://github.com/markevans/dragonfly) to create and cache smaller sizes on the fly. This works, but creates yet another dependency.

What would be really cool is if you could toggle an option to have Prince embed images that are exactly the right pixel size based on the dpi and dimensions (e.g. 2in x 1.75in). Hopefully what I'm describing makes sense. But even if it does, it may or may not ever make sense to offer this feature. Just would remove a lot of setup time looking over all the projects I've done with Prince to date.

Thanks again for your great work! So grateful to be using Prince. For this new project we're using it through http://www.docraptor.com (for the new http://www.bakecrafters.com).
mikeday
In the future we may be able to support image scaling through JavaScript, that would go some way towards streamlining this process.
arlenb
Cool. Thank you!
mikeday
Prince 9 is now available, with initial support for the writing-mode property! It's new, so tread gently. :)