Confluence 3.4 has reached end of life
Check out the [latest version] of the documentation
To add page numbering to your documentation, you need to combine some customised HTML in the header or footer with some customised CSS in the PDF stylesheet.
- Create a header or footer with an empty span element and give it a unique ID, for example
pageNum. This is a place holder for the page number in your PDF document.<span id="pageNum"/>
- Create the following CSS selector rule for the empty span and add it to the PDF stylesheet:
#pageNum:before { content: counter(page); }
Analysing the above CSS selector rule in more detail:
- The
#pageNumrule selects the HTML element with the specified ID of "pageNum", which is thespanelement we created for the header or footer. - The
:beforepart of the selector is a pseudo class that allows the insertion of content before thespanelement is processed. - The
counter(page)is a function that returns the current page number as its content. - The
contentproperty tells the CSS processor that dynamic content (that is, an incrementing page number) is to be inserted before the span tag.
Overview
Content Tools
Apps
