[reportlab-users] Bug in new para.py

Dirk Holtwick reportlab-users@reportlab.com
Mon, 26 May 2003 12:14:11 +0200


hi,

there is a small bug in para.py regarding the calculation of needed 
height. If you create paragraphs between them you will find a spacing of 
length "leading" that is to much. I think the line #142:

	 heightremaining = maxheight-leading

should be:

	 heightremaining = maxheight

for now here is a workaround:

class PmlPara(Para):

     def wrap(self, aw, ah):
         state = self.state
         if state:
             leading = state["leading"]
         else:
             leading = self.style1.leading
         w, h = Para.wrap(self, aw, ah)
         return w, h - leading

bye, dirk

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

spirito GmbH
Lerchenstr. 8
D-47057 Duisburg

fon: +49 203 3187778
mbx: holtwick@spirito.de
web: http://www.spirito.de