In "Export to PDF", how can I add the number of pages to a header/footer?

I presently have the following text as part of the PDF Stylesheet field.

content: "Page " counter(page);
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 8pt;

How can I supplement this with text displaying the total number of pages of a PDF output?

1 answer

1 accepted


 content: "Page " counter(page) " of " counter(pages);  
font-family: ConfluenceInstalledFont;  
font-size: 8pt;

Thank you Benoit. A very simple addition.

It would be helpful if Atlassian added your text into the following PDF Customisation information page:

Are there any other little tricks that can be applied to the PDF Stylesheet to help complete the headers and footers of exported information?



Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

346 views 20 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you