[reportlab-users] platypus.KeepTogether generates extra empty pages

Robin Becker robin at reportlab.com
Wed Apr 8 06:21:47 EDT 2009


Andreas Riedl wrote:

> Hi,

>

> I have encountered the following problem with 'platypus.KeepTogether':

>

> If the contents of a 'KeepTogether' doesn't fit in the current 'frame',

> its method 'split' unconditionally inserts a 'FrameBreak'.

>

> If this situation occurs after a 'PageBreak' or at the beginning of a

> document,

> that behavior causes the production of an extra empty frame.

> If the current frame was the last one of the current page that produces an

> extra empty page.

>

> The attachment contains a short demonstration of the problem and a

> suggestion

> on how to fix it. (set 'applyPatch' to True to use my patched

> 'KeepTogether',

> which replaces 'FrameBreak' by 'SmartFrameBreak', which checks for

> 'frame._atTop' )

>

> ciao, andreas

........
Do you really want a page break in a KeepTogether? Smart framebreak seems like a
good idea for the solution though.
--
Robin Becker


More information about the reportlab-users mailing list