[reportlab-users] Keeping a paragraph together on a page?

Hubert B Hickman hhickman at unmc.edu
Mon Nov 21 18:02:16 EST 2005

I need to be able to keep a Paragraph from breaking across a page.  I am 
just appending paragraphics into a SimpleDocTemplate object -- I tried the 
"KeepTogether" flowable but receive an error if I have two "KeepTogether" 
flowables together.....

  doc.build(Story, onFirstPage=self.myFirstPage, 
  File "C:\Python24\lib\site-packages\reportlab\platypus\doctemplate.py", 
line 814, in build
  File "C:\Python24\lib\site-packages\reportlab\platypus\doctemplate.py", 
line 644, in build
  File "C:\Python24\lib\site-packages\reportlab\platypus\doctemplate.py", 
line 586, in handle_flowable
    raise LayoutError("Flowable %s too large on page %d" % 
(f.identity(30), self.page))
reportlab.platypus.doctemplate.LayoutError: Flowable <KeepTogether at 
55120000>... too large on page 2

My basic problem is that I have text and an optional image to go along 
with a medical problem -- and this text and image need to kept together -- 
a page break needs to be forced if the next paragraph will not fit on a 
given page in its entirety.

Is there a better way to try to do this?


Hubert B. Hickman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20051121/a75c2703/attachment.html

More information about the reportlab-users mailing list