Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

PDF Export drives me crazy

Christian Christian March 25, 2012

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

0 votes
DavidH March 27, 2012

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
TAGS
AUG Leaders

Atlassian Community Events