Re: pageNumber attribute "countingFrom" does not appear to work

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
Not sure exactly which example you started from, but in the rlextra examples available here

https://bitbucket.org/rptlab/rlextra-examples

in test_002_paras.rml you could try changing the two countingFrom values 2 --> 8 and see that the first page then comes out 
numbered -6. So at least there it appears to be working.

The expressed page comes out as doc.page - countingFrom + 1

where doc.page starts at 1. With countingFrom set as 2 the first pdf page should have a pageNumber value of 0.

If you have three front matter pages then setting countingFrom=3 on the numbered pages and having three pages with no pageNumber 
tag means the the first content page can use a template with countingFrom="3" and be numbered 1.

On 08/01/2019 12:16, Robert Sullivan wrote:
> Hi,
> 
> I'd like to set  the value the pageNumber element should start counting
> pages from and the "countingFrom" attribute sounds like it would do this.
> However I can't get it to work.
> 
> I'm doing <pageNumber countingFrom="2"> as shown in the guide
> https://www.reportlab.com/docs/rml2pdf-userguide.pdf  but page numbering
> still starts at "1".
> 
> Thanks,
> 
> RObert
> 
> 
> _______________________________________________
> reportlab-users mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
> 


-- 
Robin Becker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.