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

This widget could not be displayed.


 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
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

550 views 7 6
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