Re: Table cell too large vertically

Blake McBride <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CABwHSOsGrKn_5jk-3=kuzxycurgNEwUKKfc7XpTkoaOYs4Yx_g@mail.gmail.com>
Yes, with multiple columns it is a little more complex.  But, this is a
serious problem, and must be handled at the reportlab level if it is to be
handled correctly.  I'd think for someone familiar with the code this could
be a two or four hour project.  Well worth the effort to solve a
fundamental issue.  Just my 2 cents...

As it is, I guesstimated the max length and split large rows into multiple
rows.  It is an ugly solution but allows me to move forward.

Thanks.

Blake McBride



On Tue, Mar 22, 2016 at 1:27 PM, Tim Roberts <[email protected]> wrote:

> Blake McBride wrote:
> >
> > Having written several report generators over the years, I think the
> > algorithm should be:
> >
> > if row is too big for an entire page
> >     while more text
> >         print as much as you can on the current page
> >         reduce text by what was printed
> >         page break
> > else if row is too big for the current page (but small enough for a
> > new page)
> >     page break
> >     print row
> > else
> >     print row
>
> But remember, that's easier said than done.  You might have word wrap in
> every cell going across.  For this to work, you would have to be doing
> that word wrapping on every cell in parallel.  When one cell detects
> that it's about to exceed the page, you'd need to send a signal to all
> of the other cells telling them to fill out as much as they can, then
> pause until after the page break, then resume.  And what about paragraph
> widow control?  That requires backtracking.
>
> There's a lot of state to carry around.
>
> --
> Tim Roberts, [email protected]
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> reportlab-users mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.