Exporting Page as PDF and CSS

Chirag Sanghavi March 11, 2021

When I export my page as PDF - in some scenario, it results into multi-page PDFs.

I have used notes to add a page count (and Page of Page).

What I also want to do is - add Title of the page in the page header or footer - so that when these are printed, each page can be connected. 

I have tried using content: running header - but that doesn't seem to be working. Can this be done?

Is there a repository that I can refer to what can be accessed and added to PDF using CSS?

 

2 answers

1 accepted

4 votes
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2021

Hello there @Chirag Sanghavi !

If you need to have the page title in the PDF header when exporting a single page that results in multiple PDF pages, do this:

  1. Go into "Space Settings"
  2. Select the "Look and Feel" tab
  3. Select "PDF Stylesheet"
  4. Copy this:
    @page {
    @top-center {
    content: element(runningheader);
    }
    }
    .pagetitle h1 {
    position: running(runningheader);
    }
  5. Click "Edit" in the "PDF Stylesheet" tab
  6. Paste the code you copied
  7. Save the changes
  8. Export your page

This will display the page title in all PDF pages after export.

Let us hear from you!

 

 

 

Edit:

Documentation on PDF exports customisation:

Customize exports to PDF

Advanced PDF export customizations

Confluence Default PDF CSS 

 

 

Chirag Sanghavi March 12, 2021

Thank you for your reply. 

Yes - that did work ; but it seems to "steal" the title. 

Here is the before and after image with this change.

Is it possible to keep title in both places? at center of the header as well as where it was originally? 

e.g. keep title as H1 where it was - as well as duplicate it in center of the header.

image.png

0 votes
Thomas Rough _K15t_
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.
March 12, 2021

Hi @Chirag Sanghavi , did you have the opportunity to use a Marketplace app to generate your PDF exports?

If so, we (K15t) develop Scroll PDF Exporter which would allow you to add static content such as a Title page or Table of Contents and also define the formatting for the page header or footer for your exports. You can learn more here.

Cheers, Thomas (K15t)

Chirag Sanghavi March 12, 2021

Thanks - I am looking more for standard functionality currently. 

Like Alex Thiau likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events