[reportlab-users] rotated text (90?) in a table cell

Paulino paulino1 at sapo.pt
Tue Oct 17 19:22:23 EDT 2006


With this simple class I am able to put text in a table cell in a 
vertical orientation, but the row's height doesn't adjust to it's 
content, thetext  goes over into the upper cell.

How can I fix this?


class TTR(Flowable):       #TableTextRotate
    '''Rotates a tex in a table cell.'''
    def __init__(self, text ):
        Flowable.__init__(self)
        self.text=text
    def draw(self):
        canvas = self.canv
        canvas.rotate(90)
        canvas.drawString( 0, -1, self.text)


More information about the reportlab-users mailing list