Hi all,
I'd like to recap how you can add page numbers on PDF exports in Confluence. This is heavily based on the post below:
The code snippet below seems to be working fine with both Confluence Server and Cloud (and I imagine Data Center). It also moves the page name to the header of each page.
.pagetitle h1 {
display: block;
position: running(pagenametop);
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 8pt;
}
@page
{ margin: 0.7in;
@Top-left
{
content:element(pagenametop);
}
@bottom-left
{
content: "NOT CONTROLLED WHEN PRINTED OR IN PDF"; /* Content to appear bottom left side of page */
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 8pt;
padding-bottom: 3em;
}
@bottom-right
{
content: "Page " counter(page) " of " counter(pages); /* Page and page NUMBER counter to appear bottom right side of page */
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 8pt;
padding-bottom: 3em;
}
}
/* Body font pdf export */
body,p,li,td,table,tr,.bodytext,.stepfield
{
font-size: 10pt;
line-height: 1.25 !important;
}
Matteo Gubellini _SoftComply_
Chief Regulatory Officer
SoftComply
Ireland
12 accepted answers
0 comments