[reportlab-users] Accessing page data in onPageEnd

Chris Wilson cwilson at nswrdn.com.au
Wed Mar 21 23:58:32 EDT 2007


Hi All,

I am rendering a document using the BaseDocTemplate. The document uses
tables containing data of a variable size and often these tables span
multiple pages, and I don't necessarily know where exactly in the table
the run onto the next page will occur during the build(). I am using the
onPageEnd event to draw onto the current canvas some text at the top and
bottom of each page. My issue is that the text I want drawn relates to
whatever text was placed in the table on the page currently being rendered.

Is it possible to in the onPageEnd method to pull from the canvas or
document the information that has just been rendered onto that page (or
to save while preparing the flowables the information in a way that can
be easily accessed int the onPageEnd during the document build()) so
that I can determine what the text I am need to draw on the page during
the onPageEnd method is?

I understand that this question is potentially vague, and I apologies
for this. I am just not sure how to better describe or phrase what I am
doing.

Thanks in advance for any help.

Regards,

Chris Wilson


More information about the reportlab-users mailing list