[reportlab-users] Finding if a flowable is at the top of a page.

Andy Robinson andy at reportlab.com
Tue May 4 06:51:15 EDT 2010


On 19 April 2010 22:01, Andy Robinson <andy at reportlab.com> wrote:

> Since you've got so far we'll definitely try to help out.  Robin's

> eyes are bleeding from something else at the moment but hopefully he

> can help out tomorrow.


Apologies for getting WAAAY behind on this one! We had a good look at
this, and your approach is neat, but we can't see a way to handle the
bad cases either. There are several fundamental problems with
footnotes:

1. You've got some content and some footnotes, you are near the bottom
of the page, you can fit the last paragraph in, but you then discover
that you can't fit its footnote. Unfortunately our system cannot
backtrack and we cannot see a way to handle this.

2. You get a really long footnote. Most publishers split these so
they can never use more than (say) half a page, and any continuation
flows onto the footnotes of the next page

3. Footnote references could easily appear inside content in table
cells, which would make it MUCH more complex to fix up the main loop;
we can't split table rows. Even if we could fix (1) and (2) we'd
probably have to rule that footnotes in tables and other containers
would just get ignored.

4. In real books, the footnotes start a bit lower down than the normal
foot of the frame; and in two-column layouts they span the frames. So
ideally you would have a separate 'footnotes frame' which grew up and
shortened the ones above it. (However people can live without this
one - your simple approach is useful for many...)

The only way we see to handle all this sanely is our "ReportLab 3000"
rewrite, in which we aim to construct 'page objects' progressively and
be able to reshuffle them and 'undo' - even going back a page - until
they look pretty, before rendering them. Things are happening on that
but I won't promise any dates on it.

Without this rewrite we can't see a way to handle the common problems.

You might, however, get away with it for one book if you choose to
limit your use of footnotes; or maybe add some ActionFlowable to let
you explicitly reserve space ;-)



> Which do you want first, this or the

> Case-Study-submission-system fix ;-) ?


We think we have now fixed this up so markdown can be used. Please
have a look and also send us any extra imagery and screenshots you'd
like...

Best Regards,

--
Andy Robinson
CEO/Chief Architect
ReportLab Europe Ltd.
Media House, 3 Palmerston Road, Wimbledon, London SW19 1PG, UK
Tel +44-20-8545-1570


More information about the reportlab-users mailing list