[reportlab-users] Table cell too large vertically

Tim Roberts timr at probo.com
Tue Mar 22 14:27:32 EDT 2016


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, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list