reportlab/platypus/doctemplate.py
changeset 1838 f7eeee67832c
parent 1829 ce5ceec32eab
child 1839 084e4af662dc
equal deleted inserted replaced
1837:a3920893b1b8 1838:f7eeee67832c
     1 #copyright ReportLab Inc. 2000
     1 #copyright ReportLab Inc. 2000
     2 #see license.txt for license details
     2 #see license.txt for license details
     3 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/doctemplate.py?cvsroot=reportlab
     3 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/doctemplate.py?cvsroot=reportlab
     4 #$Header: /tmp/reportlab/reportlab/platypus/doctemplate.py,v 1.59 2003/01/06 11:36:18 rgbecker Exp $
     4 #$Header: /tmp/reportlab/reportlab/platypus/doctemplate.py,v 1.60 2003/02/02 08:37:33 andy_robinson Exp $
     5 
     5 
     6 __version__=''' $Id: doctemplate.py,v 1.59 2003/01/06 11:36:18 rgbecker Exp $ '''
     6 __version__=''' $Id: doctemplate.py,v 1.60 2003/02/02 08:37:33 andy_robinson Exp $ '''
     7 
     7 
     8 __doc__="""
     8 __doc__="""
     9 This module contains the core structure of platypus.
     9 This module contains the core structure of platypus.
    10 
    10 
    11 Platypus constructs documents.  Document styles are determined by DocumentTemplates.
    11 Platypus constructs documents.  Document styles are determined by DocumentTemplates.
   498             else:
   498             else:
   499                 #if isinstance(f, KeepTogether): print 'could not add it to frame'
   499                 #if isinstance(f, KeepTogether): print 'could not add it to frame'
   500                 if self.allowSplitting:
   500                 if self.allowSplitting:
   501                     # see if this is a splittable thing
   501                     # see if this is a splittable thing
   502                     S = self.frame.split(f,self.canv)
   502                     S = self.frame.split(f,self.canv)
       
   503                     #print '%d parts to sequence on page %d' % (len(S), self.page)
   503                     n = len(S)
   504                     n = len(S)
   504                 else:
   505                 else:
   505                     n = 0
   506                     n = 0
   506                 #if isinstance(f, KeepTogether): print 'n=%d' % n
   507                 #if isinstance(f, KeepTogether): print 'n=%d' % n
   507                 if n:
   508                 if n:
   520                         message = "Flowable %s too large on page %d" % (f.identity(30), self.page)
   521                         message = "Flowable %s too large on page %d" % (f.identity(30), self.page)
   521                         #show us, it might be handy
   522                         #show us, it might be handy
   522                         #HACK = it seems within tables we sometimes
   523                         #HACK = it seems within tables we sometimes
   523                         #get an empty paragraph that won't fit and this
   524                         #get an empty paragraph that won't fit and this
   524                         #causes it to fall over.  FIXME FIXME FIXME
   525                         #causes it to fall over.  FIXME FIXME FIXME
   525                         raise "LayoutError", message
   526                         #raise "LayoutError", message
   526 ##                  f.postponed = 1
   527 ##                    f.postponed = 1
   527                     f._postponed = 1
   528                     f._postponed = 1
   528                     flowables.insert(0,f)           # put the flowable back
   529                     flowables.insert(0,f)           # put the flowable back
   529                     self.handle_frameEnd()
   530                     self.handle_frameEnd()
   530 
   531 
   531     #these are provided so that deriving classes can refer to them
   532     #these are provided so that deriving classes can refer to them