[reportlab-users] BUG+FIX: Paragraph splitting
    Dirk Holtwick 
    dirk.holtwick at gmail.com
       
    Mon Dec  8 12:38:40 EST 2008
    
    
  
Hi,
I found an error for paragraphs that need to split and contain inline 
images. After a long search I found out that the reason was that 
"autoLeading" was not inherited to the resulting split-paragraphs.
Here is the part in Paragraph.split that needs to be modified:
-----------------8<---------------[cut here]
	func = self._get_split_blParaFunc() 
P1=self.__class__(None,style,bulletText=self.bulletText,frags=func(blPara,0,s))
         P1.blPara = 
ParaLines(kind=1,lines=blPara.lines[0:s],aH=availHeight,aW=availWidth)
         P1._JustifyLast = 1
         P1._splitpara = 1
         P1.height = height
         P1.width = availWidth
         P1.autoLeading = self.autoLeading # <-- BUGFIX
         if style.firstLineIndent != 0:
             style = deepcopy(style)
             style.firstLineIndent = 0 
P2=self.__class__(None,style,bulletText=None,frags=func(blPara,s,n))
         P2.autoLeading = self.autoLeading # <-- BUGFIX
         return [P1,P2]
-----------------8<---------------[cut here]
Dirk
    
    
More information about the reportlab-users
mailing list