[reportlab-users] Using "follows..."

Federico Fanton federico at panizzolo.it
Thu Oct 15 09:09:27 EDT 2009


Hi everyone!
I'm trying to build a report of an invoice.. Given that an invoice has
header + rows + footer, I'd like the header to be on every page but the
footer ONLY on the last page, while on the previous ones there should be
just a "follows on the next page" label.

I thought I could use SimpleDocTemplate and its onLaterPages method, but
one problem is that if the invoice has just one page, only onFirstPage
would get called, so there would be no footer at all..
I think I'd need something like onSinglePage / onLaterPages /
onLastPage, but how can I tell if the current page is the last one? Am I
going the wrong way entirely?

(I'm using PLATYPUS)

Thanks in advance!


More information about the reportlab-users mailing list