Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Export to PDF - page counter starting from zero

hg-nick May 12, 2015

Hi Everyone, 

How can I make a page counter starting from zero?

Is this possible?

 

Here's my PDF stylesheet at the moment:

 

body,p,li,td,table,tr,.bodytext,.stepfield 
{
    font-size: 10pt;
    line-height: 1.3;
    color: #323232;
    font-weight: normal;
    counter-reset: page - 1;
}
@page{
    size: 148mm 210mm;
    margin-top: 5mm;
    margin-bottom: 10mm;
    margin-left: 5mm;
    margin-right: 5mm;
    counter-reset: page - 1;

    @bottom-right
    {
        counter-reset: page - 1;
        content: "Page " counter(page);
        font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
        font-size: 8pt;
        text-align:right;
    }

But it doesn't work. Any idea? Thanks in advance

1 answer

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2015

Hi,

a normal page counter starting from 1 can be implemented like this:

@page { 
@bottom-right {  
content: "Page " counter(page);
}
}

Having the page counter start from 0 is not possible with confluence.

Typical ideas that you might think of and try out like "counter(page-1)" or "counter-reset: page 0" do not work.

The latter would work if you created your own customized page counter but this is some extra work.

Julian Olivares October 13, 2017

Can we create a counter-reset: page 2; 
?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events