Allign one Image left and one Image right in PDF Export Header
Asked by Sascha Peter Dobrowolski:

Hey Guys...

I?m kinda new to the whole confluence thing and have the task to set a global PDF-Export Header in Confluence.

The header will contain 2 images. One should be alligned to the left, one should be alligned to the right.

I?ve tried plenty of things in HTML but was not able to get a halfway decent result till now...

Can anyone provide quick advice and tell me what the best practice on doing this is?

Last thing i tried was the following which led to the second image being alligned to the right, but in a row below the first image (because of the div of course).

1. \<div style="margin-top:10mm; text-align:left"\>
2. \<img src="IMAGE1" style="width:145px;height:50px;"/\>
3. \</div\>
4. \<div style="margin-top:10mm; text-align:right"\>
5. \<img src="IMAGE2" style="width:145px;height:50px;"/\>
6. \</div\>

I also lso tried encapsulating this into a table but then the images stick together on the left :/

Thanks in advance!


Answers:
author: Thomas Rough _K15t_
body: Hi Sascha, would using an app for your PDF exports also be an option? If so, we (K15t) develop [Scroll PDF Exporter](https://marketplace.atlassian.com/apps/7019/scroll-pdf-exporter-for-confluence?hosting=cloud&tab=overview) which allows you to customize how your exports are generated from Confluence. Within export templates that you can configure, you can define the formatting for the header and footer in your exports meaning that you could have different images both left and right aligned. If you are interested and want to learn more about the app you can check out our [Help Center](https://help.k15t.com/scroll-pdf-exporter/latest/server/scroll-pdf-exporter-114109112.html) or alternatively, you can also evaluate the app for free from the [Marketplace](https://marketplace.atlassian.com/apps/7019/scroll-pdf-exporter-for-confluence?hosting=cloud&tab=overview). Hope this information helps. Thanks, Thomas (K15t)

comments: author: Sascha Peter Dobrowolski
body: Hi Thomas,

by now i also came to the conclusion that a plugin would be the easy choice.

I?ll try some more things today and if this doesn?t work aswell ill suggest buying the plugin.

Thank you for your reply!


author: Sascha Peter Dobrowolski
body: I now scrapped all of the HTML and went over to the Stylesheet....

There i added the following:

@page  
{  
@bottom-left  
{  
content: "Seite " counter(page) " von " counter(pages);  
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;  
font-size: 8pt;  
}  
[@Top](/t5/user/viewprofilepage/user-id/1903495)-left  
{  
\<img src="/download/attachments/5144622/IMAGE1.png\>  
}

[@Top](/t5/user/viewprofilepage/user-id/1903495)-right  
{  
\<img src="/download/attachments/5144622/IMAGE2.png\>  
}  
}

Pagecounters work but i dont see the images....Any advice?

comments: author: Steffen Heller
body: In the first example you must use "position", not "text-align":

<https://www.w3schools.com/css/css_positioning.asp>

In the second example you must use "background-image", not "img":

<https://www.w3schools.com/cssref/pr_background-image.asp>


Tags: confluence-server

export

pdf

server