Header and footer on pdf's TOC page

How to add header and footer to TOC page in PDF?

4 answers

Hi Igor,

headers and footers can be included directly via
Space Admin > Look and Feel > PDF Layout + Edit "PDF Space Export Header" or "PDF Space Export Footer"

or as CSS via the Space Admin > Look and Feel > PDF Stylesheet

But it seems these headers and footers only appear on "normal" pages but not on the toc page.

If you want the same headers and footers on the toc page you can edit the "PDF Space Export Title Page" and include some html that "rebuilds" these headers.

Hey, Steffen. Thank you for your answer.

As you wrote, these headers and footers appear only on normal pages, but not on TOC. Any suggestion how to add header and footer to TOC page with HTML?

Just a quick answer:

I had another look at it and discovered that it is more tricky than I thought. But what about making your headers/footers in the Space Admin > Look and Feel > PDF Stylesheet.

Just use some code like the following and refine it with whatever css formatting you like:

@page {
@top-center { 
content: "this is a header"
} 
@bottom-center {
content: "this is a footer";
}
}

For the title page and TOC pages, use the "@ page title", then set the @top or @bottom settings.

@page title
/* Any page title-specific properties for title and toc pages.*/
{
/* Override default settings */
margin: .5in;
padding: 0em;
@top-left {content: "Header"}
@top-center{}
@top-right {}
@bottom-left {}
@bottom-center{}
@bottom-right {}
}

I used the following in the PDF Stylesheet to add a title to the Contents page.

div.toc:before {  
   font-size: 26px;  
   content: "Contents";  
   display: block;  
   margin-bottom: 13px;  
}

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

628 views 21 11
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