Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Page Title in Header in PDF Export

Anju July 17, 2017

How could I get the page title in the header on each page. So far, I've got this:

.pagetitle h1 {
position: running(runningheader);
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 10pt;
}
@page:first {
@top-left {
content: element(runningheader);
}
}
@page {
@bottom-left {
content: "Company Name";
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 10pt;
}
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 10pt;
}
/* Generate border between footer and page content */
border-bottom: 1px solid black;
}

But this takes away the title from the first page (which I don't want it to do) and adds the header to only the first page. I need the header to be on all the pages.

1 answer

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2017

As mentioned at https://community.atlassian.com/t5/Confluence-questions/Single-Page-PDF-Export-with-Title-Page/qaq-p/611537 the "position: running(runningheader)" moves (not copies!) the content to another element.

The only workaround is to use this approach for either the first page or the the header and use an additional dummy element for the other one.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events