vertical text in table cell with height None

Arkadi Colson <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Organization Smartbit bvba
Message-ID <[email protected]>
Hi

I'm using this function to rotate the text vertically:

class RotatedParagraph(Flowable):
         def __init__(self, text):
                 Flowable.__init__(self)
                 self.text       = text

         def draw(self):
                 canvas = self.canv
                 canvas.rotate(90)
                 fs = canvas._fontsize
                 canvas.translate(0, -(self.width/2) -(self.aW/2))
                 self.text.canv = canvas
                 try:
                         self.text.draw()
                 finally:
                         del self.text.canv

         def wrap(self, aW, aH):
                 self.aW, self.aH = aW, aH
                 w, h = self.text.wrap(aH,aW)
                 self.width,self.height = h, w
                 return h, w*1.1

Since we upgraded from reportlab 2.5 to 3.3 this is the result:


It looks like that the available height value has been changed. It's now 
a very high number. Any idea what's the problem here and how I can put 
vertically rotated text in a variable height cell?

Thanks!

BR
Arkadi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.