Single Page PDF Export with Title Page Edited

With the code below I'm getting a simple title page. I want to add an image too above the page title. How would I go about adding the image to the title page?

.pagetitle h1 { 
font-size: 36px !important;
margin-left: 250px !important;
padding-top: 300px !important;
page-break-after:always;
}

@page {
@top-left
{
content: element(runningheader);
}
@bottom-left {
content: "Company";
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;
border-top: 1px solid black;
}

 Also, how would I add a header to the pages? I want the header to have the page title in it.

 

2 answers

Adding an image to the page title:

.pagetitle h1 { 
font-size: 36px !important;
margin-left: 250px !important;
padding-top: 300px !important;
page-break-after:always;
background-image: url('/download/attachments/.../bgimage.jpg');
background-repeat: no-repeat;  
background-position: 150px 100px; /* distance from left and top */
}

Adding a header with the page title in it:

.pagetitle h1 { 
position: running(runningheader);
}

@page {
@top-left  {
content: element(runningheader);
}
}

Problem is, "Adding an image to the page title" and "Adding a header with the page title in it" can't be used together because they both do the same thing, they take the content of ".pagetitle h1" and move it to another place (the title page or the header).

And if it has been moved with one of them, it is not there anymore for the other one.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,777 views 25 10
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