PDF Export Header Image

Alexander Schätzle
Contributor
October 29, 2014

Hello everybody,

I'm sorry but I have really low qualitiy html knowledge, but anyway:

I'm trying to integrate just an header up on every Page, which is exported via the PDF Export feature.
I tried already to insert this in the section header under the space option "Look and Feel":

image2014-10-30 9:19:46.png

 Why doesn't it work?

Looking forward for help smile

Cheers

Alex

2 answers

1 accepted

0 votes
Answer accepted
Alexander Schätzle
Contributor
November 5, 2014

Hello,

thanks for your answer.
Unfortunaly that could not help me.

The thing is: I follow the instructions of this page exactly https://confluence.atlassian.com/display/CONF53/Customising+Exports+to+PDF

But there isn't any picture appearing.

Greets 

Guilherme Nedel [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 6, 2014

Hi Alex, could you manage to see at least some text printed in the PDF header - could we try that just for testing? I am have consulted this doc instead, for Advanced Customizations(https://confluence.atlassian.com/display/DOC/Advanced+PDF+Export+Customisations), editing in the layout section.

Alexander Schätzle
Contributor
November 6, 2014

Hi, thanks for your answer. That's really kind! As the PDF Stylesheet, I am using this code: @page { @top-center { content: "THIS IS PRINTED ON TOP"; font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } @bottom-center { content: "Page " counter(page); font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } /* Any other page-specific rules */ } .fsTitlePage { margin-left: auto; margin-top: 50mm; margin-right: auto; page-break-after:always } .fsTitle { font-size: 42px; font-weight: bold; margin: 72px 0 4px 0; text-align:center; } In the PDF Header section I am using this code: <div class="fsTitlePage"> <img src="/download/attachments/13076465/Sikla%20Logo%20Farbe%20midi.jpg" /> <h1>Test</h1> <div class="fsTitle">Planning for Confluence 4.0</div> </div> I can only see on top the "THIS IS PRINTED ON TOP" (see CSS Layout) The defined header, even if I am just using text, is not shown on my pdf document. But, if I am using this code in the PDF Space Export Footer: <span id="pageNum"/> The page number is shown on every page. That seems really strange for me? Thank you for your help! Greets Alex

Guilherme Nedel [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 7, 2014

Hi Alex, please attempt to embed the HTML tags without any CSS id or class first, as means to isolate. In my tests I did employ pure HTML, so I believe the classes may be causing the content from being exported.

Alexander Schätzle
Contributor
November 7, 2014

Hey, you are my hero :) No i can see the picture but it is shown behind the Text. Is there a possibility to force the PDF Export that the picture has to been show completely, or do i have to format it in a small size?

Alexander Schätzle
Contributor
November 7, 2014

By format i mean using html like -> width="70" height="137" align="top"

Alexander Schätzle
Contributor
November 7, 2014

Okay now it works, but why doesn't it work if i am only exporting a Page ?

Guilherme Nedel [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 10, 2014

Hi Alex, there are different stylesheets for each corresponding layout, Site, Page, PDF and so on, as described in this doc - https://confluence.atlassian.com/display/DOC/Customising+Space+Layouts - be sure to edit the one where it reads PDF. :)

Guilherme Nedel [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 10, 2014

Also if the answer helps, please mark the √ mark so other people can use this thread as reference.

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2014

>> Okay now it works, but why doesn't it work if i am only exporting a Page ? Because the PDF Export Header only works for Space Exports: https://answers.atlassian.com/questions/16019

Like Elzette Buys likes this
Henricus Fluthgraf May 20, 2018

Please can you help me, i´m totally irritated.

 

I want to Export ONE page per PDF.

PDF Format template wont work in this case, because it is not sable for a single side (https://confluence.atlassian.com/doc/advanced-pdf-export-customizations-198806890.html).

on this site, the hint is to use the PDF Layout section in this matter.

the Code to use should be like:

Version:1.0 StartHTML:000000249 EndHTML:000078497 StartFragment:000078231 EndFragment:000078399 StartSelection:000078231 EndSelection:000078399 SourceURL:https://confluence.atlassian.com/doc/advanced-pdf-export-customizations-198806890.html Advanced PDF Export Customizations - Atlassian Documentation

<div style="margin-top: 10.0mm;">
        <img src="https://confluence.atlassian.com/download/attachments/12346/header-image.png" />
      </div>
    

 I tried it, and changed the Adress for my Image. But it doesnt works.

 

Has someone a hint for me. I am not a coder and need a step by step Information.

 

best Henry

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2018

You say "it doesn't work", what does that mean?

Does the image not show? Does the page not load? Anything else?

And what did you do so far?

Did you follow the steps at "Adding Images to Headers and Footers" on https://confluence.atlassian.com/doc/advanced-pdf-export-customizations-198806890.html?_ga=2.98676954.575905690.1527501186-1823506100.1404720553 ?

0 votes
Guilherme Nedel [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2014

Hello Alexander, I have through the same question while testing this, when I realized that the Custom Layout works from the Space Tools menu, directly accessbible at <yourConfluenceDomain>/spaces/flyingpdf/doflyingpdf.action?key=SPACE_KEY.

Hope that is it. smile

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events