Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

PDF page numbering

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:

https://community.atlassian.com/t5/Confluence-questions/Updated-HOW-TO-Get-Page-Numbers-On-PDF-Exports/qaq-p/887863 

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;
}

 

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events