Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,881
Community Members
 
Community Events
165
Community Groups

Insert logo for PDF export header

Hi,

I am trying to insert a logo into the header of the exported PDF. I am following the instructions on Advanced PDF Export Customizations, but the exported PDF is not showing the logo image. This is the html code I have in the header section: 

<div style="margin-top: 2.54cm;">
<img src="download/attachments/2509963270/logo.png">
</div>

The image is uploaded in the same workspace, with the URL taken from the Attachments tab. Completed URL is (https://sentify.atlassian.net/wiki/download/attachments/2509963270/logo.png?api=v2).

 

Could someone please take a look into what could go wrong in my case? Many thanks in advance.

 

Van

4 answers

2 accepted

0 votes
Answer accepted
Shannon S Atlassian Team Apr 08, 2022

Hi Van Le,

Welcome to Atlassian Community! I'm happy to help you.

First, be aware that edits made in the Space Settings apply to Full Space exports only. If you want a single page export specifically, make sure you create it from Space Settings > Export Space, and choose custom export, where you can select the single page you want to export.

I can get this to work with the default 10.0mm margin size, but not once I change it to 2.54cm or 25.4mm, so I believe setting the margin larger might be what's causing the issue. Note:

Very large images can spill over into the body of a page or alter the position of text or other elements used within a header or footer. In such situations, it is recommended that you reduce the size of the image and then attach it to your Confluence page again. If you prefer to keep the image size and want to move the content lower instead, you can do so by configuring the margin-top properties in the @page CSS rule.

In this case, you can try making this modification in the PDF stylesheet section instead. I got the below page margins from Customize Exports to PDF

@page
{
margin-top: 2.54cm;
margin-bottom: 2.54cm;
margin-left: 1.27cm;
margin-right: 1.27cm;

@top-left
{
background-image: url('/download/attachments/2509963270/logo.png');
background-size: 250px 86px;
background-repeat: no-repeat;
background-position: left center;
height: 86px;
width: 250px;
}
}

I set the background-size and height/width according to my logo, but you can adjust it for yours.

Let me know if that works! I tested it with my logo, and I can confirm it works well.

Take care,

Shannon | Atlassian Cloud Support

0 votes
Answer accepted

Hi @Van Le ,

welcome to the Atlassian community!

if you are on the cloud, as specified in the tag, you are checking on the wrong place. Documentaion posted in your description is for Server and Data Center instances.

Please take a look here https://support.atlassian.com/confluence-cloud/docs/customize-exports-to-pdf/ 

Hope this helps,

Fabio

I have followed a few other suggestions from similar posts but couldn't get it to work. Look forward to hearing from you.

thank you, issue resolved

Suggest an answer

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

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

392 views 2 13
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