Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Single page PDF export with image in footer

Brian Curtis March 20, 2018

Hello, all. I followed the instructions in "Advanced PDF Export Customizations" to attach a footer image to an article, then added a div as instructed to point to that attachment. The PDF Footer section of the PDF  Layout reads

<div style="margin-bottom: 10.0mm; text-align:center">
<img src="download/attachments/222472950/FooterTest.png" />
</div>

But it's not showing up as a footer when I do the ... > Export (single page) to PDF command, or when I do the longer Space Tools > Export Tools > Export > PDF selection process.  I'm not a coder, so I don't know anything about CSS rules; I just copy and paste whatever I find. Any suggestions?

1 answer

0 votes
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.
April 4, 2018

There are two different answers why the footer doesn't show, one for "Export (single page) to PDF" and another one for "Space Tools > Export Tools > Export > PDF".


1. Export (single page) to PDF

The first sentence of the description at "Advanced PDF Export Customizations" says it all:

Single page exports don't support adding HTML headers and footers via the PDF Layout page...

It just doesn't work.


2. Space Tools > Export Tools > Export > PDF

That does work. If nothing shows there is probably something wrong with the image path.

Do the following:

  • Add some dummy text to the PDF Layout and export again
  • If that text shows in the export, you have proof that the footer is actually there
  • Then go back to the PDF Layout and check that the image path is correct
  • If still nothing shows, come back here
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.
April 4, 2018

By the way, what do mean with "article"?

I know pages and blog posts and was assuming you were talking about pages. Not too familiar with blog posts, though.

Brian Curtis April 16, 2018

Sorry about the terminology. I'm trying to attach an image to a page footer.

I went to Space Tools > Look and Feel > PDF Layout tab and revised the PDF Space Export Footer. Doing the page-selection option on Space Tools > Content Tools > Export tab did produce a PDF with the text header and footer. However, replacing the footer with the image "div" code produces nothing. No image, no text; just a blank footer.

<div style="margin-bottom: 10.0mm; text-align:center">
<img src="download/attachments/222472950/FooterTest.png" />
</div>

 

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.
June 5, 2018

I am trying to follow but it is hard because the terminology is all different and I don't know what the code of that first export (= the "PDF Space Export Footer") looks like.

My understanding is this:

  1. You made a first export with a footer that contains text and that text correctly shows
  2. You made a second export with a footer than contains ONLY an image (the "image 'div' code" from above) and nothing shows

IF SO, this means:

  1. The footer is there, otherwise you could not see the "text header and footer"
  2. Something is wrong with the image "div" code

=> Did you check that the image path is correct?
=> Did you follow the description from

https://confluence.atlassian.com/doc/advanced-pdf-export-customizations-198806890.html?_ga=2.46016172.942796604.1528119574-1390076098.1528119574

Quote:

  1. Attach the image to a Confluence page.
  2. View the list of attachments on that page, then right-click the image and copy its location.
  3. Paste the link into the appropriate src="" attribute in your PDF Stylesheet, as shown above.
  4. Edit the image URL so that it is relative, by removing the first part of the URL before /download/....

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events