Headers and footers missing from PDF export
Asked by Joshua Palmer:

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,


Answers:
author: Steffen Heller
body: Have you tried without the colon (:)? That should work:

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

comments: author: AndreasC
body: 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


author: Steffen Heller
body: 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?


author: AndreasC
body: 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.


author: Steffen Heller
body: 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.


author: AndreasC
body: 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


author: AndreasC
body: 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


author: Steffen Heller
body: 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> ?


author: Joshua Palmer
body: 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 --


author: Joshua Palmer
body: 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;  
}


author: Bruna Griebeler
body: 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!

comments: author: Joshua Palmer
body: 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;  
}


Tags: confluence-cloud