Confluence 4.3 has reached end of life
Check out the [latest version] of the documentation
To add page numbering, you need to combine customised HTML in the PDF Layout with customised CSS in the PDF Stylesheet.
PDF Layout HTML: In the Footer section (or the Header section), use an empty span element with a unique ID, for example
pageNum,to act as a place holder for the page number.HTML - PDF Layout: Footer Section<span id="pageNum"/>
PDF Stylesheet CSS: Create the following CSS selector rule for the empty span:
CSS - 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 at the span tag.
Overview
Content Tools
Apps
