[reportlab-users] AttributeError: XPreformatted instance has no attribute 'blPara'

Michael Hipp michael at redmule.com
Tue Jan 3 13:31:14 EST 2012


On 2012-01-03 12:10 PM, Adrian Klaver wrote:

> Looking at paragraph.py self.blPara is not defined until the wrap() method of

> the Paragraph class is called.



> ch = XPreformatted(hdr, self.style)

> w,h = ch.wrap(aW,aH)

> ch.drawOn(canvas, 0.75*inch, ph-1.00*inch)


You are correct, thanks. Calling wrap() before drawOn() avoids the error.

Michael


More information about the reportlab-users mailing list