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

Andreas Riedl office at tapirdata.com
Tue Apr 7 17:30:16 EDT 2009


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



--

: XXX>-OO andreas riedl otto bauer g. 11/5 :

: XX< \ | software development a-1060 wien :

: XXX>-`. \ | system administration +431 9667865 :

: \_ `.) www.tapirdata.com +43699 19667865 :


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patchKeepTogether.py
Type: text/x-python
Size: 2530 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20090407/714b6995/attachment.py>


More information about the reportlab-users mailing list