Re: Table cell too large vertically

Tim Roberts <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Organization Providenza & Boekelheide, Inc.
Message-ID <[email protected]>
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.
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.