Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to get a Graphic on the Page Title in the PDF Export Title Page

I inherited a Confluence space where I need to export Jira information to PDF with a Logo on the cover page and footer info. He started the Style sheet with 

.pagetitle h1 {

background-image: url(https://confluence.xyz.tech/download/filename.jpg)

background-position: center top;

background-repeat: no-repeat;

etc.

}


On one child page, this works. On all other pages, the logo randomly shows up and creates a lot of post-export work. 

The person who put this PDF stylesheet together only used the PDF stylesheet. 

I moved code to the PDF layout, thinking this is where you put the Title page and footer content. It works for the footer and is impressively stubborn in not showing any graphic on the title page. I even went back to trying to get the graphic in place with the PDF Stylesheet, but there it is either on every page as a background, or not showing at all unless I use the original code - which is not ideal as I stated at the beginning.

This is the PDF Layout Export Title Page code:
fsTitle {
 .pagetitle h1
 {
 font-size: 36px !important;
 margin-left: 250px !important;
 padding-top: 300px !important;
 page-break-after:always;
 }
 {
 background-image:  url(https://confluence.plume.tech/download/attachments/51780125/Plume_SP_Triple_Symbol_Wordmark_Stacked.jpg?api=v2);
 background-position: center top;
 background-repeat: no-repeat;
 background-size: 75%;
 margin-left: 000px !important;
 padding-top: 700px !important;
 page-break-after:always;
 }
}

The PDF style sheet, I reused and modified from the Atlassian "Expert PDF CSS field example" and removed any fsTitle or .pagetitle h1 calls, as I already used them in the PDF Layout.

1 answer

1 accepted

Vero,
That is basically the same design the first owner used. 

It worked (as does this solution) for the child page he built it for, but for other docs/pages, it sends the logo to random pages and positions on subsequent pages. 

Now I can see the .pagetitle is defined as H1, so then in the Confluence settings that this style sheet triggers with all H1s and adds place logos. But... it doesn't do a page break, and it ignores the no-repeat instruction.

Thanks for showing me this is truly an answer. I just had to read it more closely!

- Susan

Like Vero Rivas likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,633 views 7 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you