Headers and footers missing from PDF export

I did some custom html for the title page of my PDF export. Now, the information I set up for headers and footers under PDF Space Export Header and PDF Space Export Footer is not showing in the output PDF.

Is there a way to determine why my headers and footers have disappeared?

Thanks,

8 answers

Hello AndreasC,

I think what you describe is correct standard behaviour.

  • What you enter at "PDF Space Export Header" or at "PDF Space Export Footer" will be displayed in the header and footer of normal pages but not on the title page. Title pages typically don't contain headers or footers.
  • If you define some CSS formats for "@page" it will also only appear on normal pages. If you want to define something for the title page you must use "@page:first" instead.

Have you tried without the colon (:)? That should work:

@page:first {  
@bottom-left {   
content: "some text";  
}  
}

Hello Steffen,

yes thats why I`m wondering me,

I have tryed other css with bottom-center and bottom-right and they work but not bottom-left, ive tryed that on confluence 5.3.1 and 5.4.1.

best regards

Have you tried the code from above?

When I try it I get "some text" on the bottom left of the first page. That is what you are looking for, right?

Yes on my Titlepage :) But its still not working. Maybe ive overwritten css from the confluencedefaultpdf.css from confluence, i will figure it out. Thank you for your time.

Hi Joshua,

Could you share with us this custom HTML? Seems that this customization for the title is overwritting the previous customization for the header and the footer.

Cheers!

Sure -- thanks for your help. Here's the custom code so far:

.pagetitle
{
page-break-before: always;
}
.fsTitlePage
{
margin-left: auto;
margin-top: 10mm;
margin-right: auto;
page-break-after:always
}

.frontpagelogo
{
text-align: right;
}

.fsTitle
{
font-size: 42px;
font-weight: normal;
margin: 150px 0 4px 0;
text-align:center;
}

.fsTitle2
{
font-size: 42px;
font-weight: normal;
margin: 20px 0 4px 0;
text-align:center;
}

.fsPubDate
{
font-size: 18px;
font-weight: normal;
margin: 100px 50px 4px 0;
text-align: right;
}

.fsDisclaimerTitle
{
font-size: 24px;
font-weight: normal;
margin: 200px 0 4px 0;
text-align: center;
}

.fsDisclaimerCopy
{
font-size: 15px;
font-weight: normal;
margin: 20px 0 4px 0;
text-align: center;
}

Sure -- thanks for your help. Here's the custom code so far:

.pagetitle
{
page-break-before: always;
}
.fsTitlePage
{
margin-left: auto;
margin-top: 10mm;
margin-right: auto;
page-break-after:always
}

.frontpagelogo
{
text-align: right;
}

.fsTitle
{
font-size: 42px;
font-weight: normal;
margin: 150px 0 4px 0;
text-align:center;
}

.fsTitle2
{
font-size: 42px;
font-weight: normal;
margin: 20px 0 4px 0;
text-align:center;
}

.fsPubDate
{
font-size: 18px;
font-weight: normal;
margin: 100px 50px 4px 0;
text-align: right;
}

.fsDisclaimerTitle
{
font-size: 24px;
font-weight: normal;
margin: 200px 0 4px 0;
text-align: center;
}

.fsDisclaimerCopy
{
font-size: 15px;
font-weight: normal;
margin: 20px 0 4px 0;
text-align: center;
}

I'd still like some help with this. Can anyone share code for a custom title page (PDF export) that retains the headers and footers on all pages?
Thanks --

From your description it is hard to tell what you did wrong, for example I haven't understood WHERE you entered that "custom code" and then I don't get why you talk about "custom html" when the code is pure CSS!?

Are you sure that you did not mix up a few things?

Did you study the documentation: https://confluence.atlassian.com/display/DOC/Customising+Exports+to+PDF ?

Hello Steffen,

i have a similar problem, ive added a line of copyrighttext to my footer at the pdf-layout but its not appering on my titlepage only at the following pages.

Same there if i add a @page{ @bottom-left:{content: "some text"}} to the css.

If i use somethig like @page{ @bottom-center:{content: "some text"}}

I works.

What im doing wrong? (Confluence 5.4.1)

Best regards and thank you

Hello Steffen thank you for your reply.

Thats right, i can use "@page:first" for accessing the footer on my titlepage, but if i use something like:

"@page:first {@bottom-left: { content: "some text" }}"

then i didnt get any text on my footer on the titlepage, if i use:

"@page:first {@bottom-center: { content: "some text" }}"

it works?

And i have another thing, how could i prevent confluence that the titlepage will be counted?

I export the space with 1 page for example.

Then i have 2 pages that will counted for titlepage and for the normal page.

I can hide the pagenumbering for the titlepage but exported it still counts them on the other page.

Is there any way to get somethink like

@page{@bottom-right: {

content: counter(page) "/" counter(pages)-1 ;

}}

working?

Thank you for your great support!

AndreasC

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 ...

913 views 23 12
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