Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Table of contents header showing on separate page from Table of Contents

Nicholas Olson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2021

Hello,

I've been digging around trying to find an answer to my question and have found a few posts that appear to ask similar questions, but the answers have not solved my issue.

 

I'm looking to use the space exporter to export a selection of pages as a pdf. I want to include a title page and the auto generated Table of Contents (TOC). I've successfully got the title page to appear with an image and desired text via the "Customize Exports to PDF" help document found here:  https://confluence.atlassian.com/conf74/customize-exports-to-pdf-1003128325.html

 

Specifically I used the code here to accomplish this:

<div class="fsTitlePage">  
 <img src="/download/attachments/169118009/atlassian_logo.png" />  
<div class="fsDocTitle">Documentation for Confluence</div>  
</div>   
<div class="tocTitle">Contents</div>

 

My resultant code for the PDF layout looks like:

<div class="fsTitlePage"> 
<img src="/download/attachments/80184421/GLASS_Logo_textOnly_gradMod_FINAL.png?api=v2"class ="titleImage" />
<div class="fsDocTitle">GLASS Core User Guide</div>
</div>
<h1>Table of Contents</h1>

 

I include more code in the PDF Export stylesheet to further control the formatting a bit, also from the referenced document (haven't looked at tweaking that yet until the other TOC heading is fixed):

.fsTitlePage 
{
margin-left: auto;
margin-top: 50mm;
margin-right: auto;
page-break-after:always;
}

.fsDocTitle
{
font-size: 42px;
font-weight: bold;
margin: 72px 0 4px 0;
text-align:center;
}

.titleImage{
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}

 

The resultant of all this is my correctly formatted title page, the following page with a properly formatted string of 'Table of Contents', but then what appears to be a page break before the table of contents (which currently consists of only 3 pages).

 

I tried removing the image in case its size was somehow causing a formatting issue, but the results are the same. I am not very well versed in this code (hence using the guides/tutorials) so this has me quite stumped.

Also, in case it makes a difference, we are currently on Confluence 7.4.1 and we won't be able to purchase any add-ons right now, so I'm looking for a stock way to solve this issue.

Thanks in advance for any help!

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events