[reportlab-users] re: Crashing when table goes over a page
Robin Becker
reportlab-users@reportlab.com
Mon, 11 Aug 2003 12:50:31 +0100
Garth and others. I have a fix for the problem you reported. At some time
in the past Aaron turned off hard error trapping in the frame _add method.
Now we control that using rl_config.allowTableBoundsErrors. I think he
assumed that we would fail in the split method if the table was too wide.
I changed the test in frames._add to
if not rl_config.allowTableBoundsErrors and ((h>self._aH or w>self._aW) and not trySplit):
and in the table split method I used
def split(self, availWidth, availHeight):
self._calc(availWidth, availHeight)
if self.splitByRow:
if not rl_config.allowTableBoundsErrors and self._width>availWidth: return []
return self._splitRows(availHeight)
else:
raise NotImplementedError
that seems to fix the table of doom at the expense of allowing tables that
are too wide.
--
Robin Becker