Single Page PDF Customization

David Mars August 17, 2014

I have read all the documentation about pdf page customization but I don't understand it. Is it possible to customize a single page within a space? I would like to add an image header and a footer, both styled via css.

I have tried using the space look and feel options but these do not have any effect [either on a space or the page within that space].

I am using the latest version of Confluence [30 day trial].

4 answers

1 vote
cevatkerim June 16, 2016

none of these worked. It only works if I export the space...

1 vote
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.
August 17, 2014

This is a bit complicated and seems to often cause confusion. I will try to sort it out:

There are three ways to "customize" your pages:

  1. Look and Feel > PDF Stylesheet:
    Enter css code to define the layout for all the pages in a space
  2. Look and Feel > PDF Layout:
    Enter html code to define header and/or footers for all the pages in a space
  3. {css} macro:
    Enter css code into a confluence page to define the layout for this page only

These customisations will take effect when you export your pages. Here again, we have two different ways to export:

  1. Single page export: Tools > Export to PDF:
    Only no. 1 and 3 from the list above will take effect (-> Anything entered at PDF Layout won't show!)
  2. Space exports: Browse > Advanced > PDF Export
    All three from the list above will take effect

If you want headers and footers, there are two main methods:
Header and footer can be added with css code in the PDF Stylesheet or with html code in PDF Layout. In both cases it will affect all the pages in the space and not just one.

If you use the method with PDF Stylesheet, you can both use a single page export or a space export. It you use the method with PDF Layout, it will only work if you do a Space export.

The {css} macro is typically used for inline css and probably not the ideal solution when you need headers and footers.

------

If nothing has worked so far, try this for a start:

Enter some html code to the PDF Layout > PDF Space Export Header and do a Space export. The exported PDF should have a header with the text you entered.

If you want to extend that and use an image in the header, you must first attach the image to a page and copy its URL.

David Mars August 17, 2014

Thanks for all your help. I will try it out!

Lode Bosmans February 25, 2020

Good explanation! Helped me out a lot with highlighting the difference for styling individual pages. This should be copied to the official documentation.

0 votes
thamm March 18, 2016

Are there any possibilities to customize the styling of the pdf export, such that it only affects the space export and not the single page export?

I have styled the pdf using html/css, but i also want to have the possibility to export a page without any styles using the button "Export to PDF" on a specific confluence-page.

Patrick Leal May 6, 2021

Try k15t's Scroll PDF Exporter plugin. I am using it, and it works very well. 

0 votes
Aleš Laňar
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.
August 17, 2014

Hi David.

You can customize it via css, but i dont know if is it possible to only one page. If you need to CSS PDF then go to Look and Feel and there is it :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events