[reportlab-users] pageNumber attribute "countingFrom" does not appear to work
Robin Becker
robin at reportlab.com
Tue Jan 8 11:48:31 EST 2019
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
> reportlab-users at lists2.reportlab.com
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>
--
Robin Becker
More information about the reportlab-users
mailing list