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
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

931 views 13 11
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