WeasyPrint icon indicating copy to clipboard operation
WeasyPrint copied to clipboard

Handle writing-mode

Open stolzweb opened this issue 7 years ago • 10 comments

We tried nearly any html to pdf converter. But non of them could reach your level. Amazing work! As we need to rotate text in a table 90 deg we tried to use transform: rotate(90deg);. But CSS does not exatly what we expected. The css tag «writing-mode:sideways-lr» does exactly what we expected, but that's not supported in WeasyPrint. Is there any chance that WeasyPrint can support «writing-mode:sideways-lr»?

stolzweb avatar Feb 18 '18 21:02 stolzweb

We tried nearly any html to pdf converter. But non of them could reach your level. Amazing work!

Thank you!

Is there any chance that WeasyPrint can support «writing-mode:sideways-lr»?

I'm currently working on right-to-left and bidirectional text, it's a first step before writing-mode. It's really not easy to implement, so I can't promise a deadline, but it would be a great feature to have!

liZe avatar Feb 19 '18 23:02 liZe

Hey there @liZe Any news on right-to-left text?

shadiakiki1986 avatar May 20 '18 03:05 shadiakiki1986

Any news on right-to-left text?

Hi!

There's no new code. You can follow #106 that's on my short TODO-list before 43.

liZe avatar May 21 '18 09:05 liZe

even writing-mode: vertical-rlis not supporting

sravankml avatar Oct 10 '18 04:10 sravankml

I just ran into this. Is there any update?

For now, a workaround for vertical text would be very appreciated.

transform: rotate(270deg); seems to be something, but breaks a lot of orientation stuff.

claell avatar Sep 23 '23 21:09 claell

I just ran into this. Is there any update?

There’s no update about this, it’s a huge feature that requires a lot of changes.

liZe avatar Sep 24 '23 09:09 liZe

I myself stumbled upon this issue and in my case even transform did nothing.

For now, a workaround for vertical text would be very appreciated.

A possible workaround could be to use an SVG (if the table cell content isn't variable, as SVG doesn't support dynamic line breaks). Here's an example for how vertical text could be implemented by using SVG:

<svg width='40' height='100'>
    <text x='20' y='100' transform='rotate(270, 20, 100)' style='text-anchor: start; alignment-baseline: middle;'>
        vertical text
    </text>
</svg>

Hope this helps!

neinkopp avatar Feb 15 '24 19:02 neinkopp