PDF Export drives me crazy

Hi all!

I have now spent nearly one day to get the pdf export up and running and I am close before going crazy. So there are some questions from my side:

1) I have well accepted that at the moment it is not possible to display the name of a page on the title page. BUT is there a way to display a title page when using Tools -> Export to PDF? I want to give my users to export the pages to pdf on their own. They will not have the rights to go via space administration.

2) We are using the {table of contents} macro to display a toc in the page itself. Is there a way to display the page numbers next to each heading in the toc in the exported pdf? Do I need to add the {toc} to a page or is there a way to just "print" a toc?

3) How can I add a page break AFTER the toc and BEFORE each H1 heading? So the sequence should be:

Page 1: Title page (logo + text) (DOES WORK ALREADY)
Page 2: Page title + TOC
Page 3++: Every H1 heading should start a new page

I have now doing following setup:

PDF Stylesheet:

.fsTitlePage {
  display: block;
  text-align: center;
  margin-left: auto;
  margin-top: 50mm;
  margin-right: auto;
}
 
.fsTitle {
  font-size: 28px;
  font-weight: bold;
  margin-left: auto;
  margin-top: 50mm;
  margin-right: auto;
  text-align:center;
}

@page {
  @bottom-left {
    content: "© HOERBIGER Deutschland Holding";
    font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
    font-size: 8pt;
  }
  @bottom-right {
    content: "Page " counter(page);
    font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
    font-size: 8pt;
  }
}

.pagetitle h1 { 
  font-size: 36px !important;
  margin-left: 50px !important;
  padding-top: 50px !important;
}

div.toc  {
  page-break-after: always;
}

span.toclead:before  {
  content: leader(solid);
}

PDF Layout:

<div class="fsTitlePage">
  <img src="/download/attachments/2097946/HOERBIGER.png"/>
<div class="fsTitle">System documentation from mydoc.hoerbiger.com</div></div>

1 answer

I don't see a page-break-before tag anywhere in your CSS.

I have this:

.pagetitle

{

page-break-before: always;

}

Maybe I misunderstood, but this puts each of my pages on new pages in the PDF -- but I am exporting the whole site, not one "page"

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,389 views 24 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you