[reportlab-users] BUG: Indenters not allowed in table cells?
Roberto Alsina
ralsina at netmanagers.com.ar
Fri Aug 28 14:33:23 EDT 2009
I had a problem doing this in rst2pdf, but I am now thinking this may be a
reportlab limitation. If I use an Indenter flowable in a cell, I get an
exception about Indenters not having a width.
This is with RL 2.3
Here's the test program:
http://pastebin.ca/1546099
Here's the exception:
Traceback (most recent call last):
File "test_issue_173.py", line 24, in <module>
go()
File "test_issue_173.py", line 22, in go
doc.build(Story)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py",
line 1010, in build
BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py",
line 777, in build
self.handle_flowable(flowables)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py",
line 665, in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
File "/usr/lib/python2.6/site-packages/reportlab/platypus/frames.py", line
159, in _add
w, h = flowable.wrap(aW, h)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/tables.py", line
1092, in wrap
self._calc(availWidth, availHeight)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/tables.py", line
587, in _calc
self._calc_height(availHeight,availWidth,W=W)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/tables.py", line
525, in _calc_height
dW,t = self._listCellGeom(v,w or self._listValueWidth(v),s)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/tables.py", line
375, in _listCellGeom
vw, vh = v.wrapOn(canv, aW, aH)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/flowables.py",
line 116, in wrapOn
w, h = self.wrap(aW,aH)
File "/usr/lib/python2.6/site-packages/reportlab/platypus/flowables.py",
line 124, in wrap
return (self.width, self.height)
AttributeError: Indenter instance has no attribute 'width'
--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)
More information about the reportlab-users
mailing list