[reportlab-users] rotated text (90º) in a table cell
Andy Robinson
andy at reportlab.com
Tue Oct 17 11:52:33 EDT 2006
paulino1 at sapo.pt wrote:
> How can i rotate the text in a table cell by 90º?
Probably by doing a lot of maths in your head :-(
There are no features to do it for you
> Specially when I don't know the height of the previous rows.
>
> The canvas.rotate() feature puts the text in a fixed place in the page.
You can rotate around a known point by doing this...
canvas.translate(new_x, new_y)
canvas.rotate(angle)
canvas.translate(-new_x, -new_y)
I think your best chance is to define a small flowable object which does
a rotation at the beginning of its draw method, then draws the needed
string.
- Andy
More information about the reportlab-users
mailing list