How to add image on top right of page- PDF Export Customisations?

Hi there,

I am trying to put a logo on the rop right corner of my page but it won't work. Can you tell me what I'm doing wrong? I tried adding a content: url to stylesheet but that didn't work either. Is it the size of my image (180x86)?

PDF Space Export Header

<div style=s"margin-top:10mm; text-align:right">

<img src="/download/attachments/###/name.jpg"/>

</div>

Stylesheet

@page

{

/*The A4 paper size is 210 mm wide by 297 mm long*/

size: 210mm 297mm;

}

@page

{

size: 210mm 297mm;

margin-top: 20mm;

margin-bottom: 10mm;

margin-left: 10mm;

margin-right: 10mm;

}

div

{

word-wrap: break-word;

}

@page {

@top-right{

background-image: url("/download/attachments/###/name.jpg");

}

}

Would appreciate your support.

Thanks,

Shreena

3 answers

Hey!

I'm struggling with that at the moment as well.

For me it worked best when I put the background image to the complete page element:

@page {
background-image: url(http://xyz.com/logo1.png);
background-repeat: no-repeat;}
You might then add background-position to align the image.

I noticed that adding the image to the @top elements displays them but depending on the size of the logo it's placed outside the visible area. You can try that by adding a large fully colored graphic. I only saw a 2px line of the logo although it was like 50x50px.

And another thing that took a while to find out: If the logo should stretch over the complete document, the desired width is 797px at 96dpi.

I don't think any of it is working, even if I get rid of most of the code and just leave the logo it isn't displaying.

One important thing to mention: You will not get the PDF layout when you export using the PDF export from the page tools. It only works when using the PDF export method of the space.

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

281 views 11 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