Insert logo for PDF export header
Asked by Van Le:

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](https://confluence.atlassian.com/doc/advanced-pdf-export-customizations-198806890.html), 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


Answers:
author: Shannon S
body: 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](https://support.atlassian.com/confluence-cloud/docs/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


author: Fabio Racobaldo _Herzum_
body: Hi [@Van Le](/t5/user/viewprofilepage/user-id/4865996) ,

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


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


author: Van Le
body: thank you, issue resolved


Tags: cloud

confluence-cloud