[reportlab-users] Re: reset page numbers

Robin Becker robin at reportlab.com
Tue Apr 18 03:41:01 EDT 2006


David S. wrote:
> I noticed the Macro Flowable and tried:
> story.append(Macro("canvas._pageNumber=1"))
> 
> but no luck.  Seemed like cheating pretty badly anyhow.
..... it's unlikely that a simple flowable can do the job; that's 
because you would have to ensure that the change happened at the end of 
the page (after the last useful flowable) or at the beginning (before 
the first useful one).

Therefore I suggest you consider a combination of a flowable which sets 
a flag when rendered and then the beforePage method of the pageTemplate 
can choose to reset the canvas._pageNumber.
-- 
Robin Becker


More information about the reportlab-users mailing list