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

0 votes
Answer 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
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

292 views 2 12
Read article

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