Page breaks in custom exports

Our PDF layout is setup to do page breaks after h1, h2, and h3 as well as adjust table layouts. However, when we use the space custom export, we want to apply the same functionality. How do I create CSS to do the following that we have in PDF Layout to put in the PDF Stylesheet?

.wiki-content h1 {
border-bottom: 2px solid #919699 ;
padding-bottom: 1px;
}

.wiki-content h2 {
border-bottom: 2px solid #D8D8D8 ;
padding-bottom: 1px;
}

}
h1, h2, h3 {
page-break-before: always;
}


table
{
table-layout:auto !important;
width: auto !important;

}


2 answers

Hi Karie,

I don't really get your question.

I thought that there was no difference between space export and custom space exports. Formats defined in either PDF Layout and/or PDF Stylesheet will work in both cases.

Sorry if I missed something, but where did you define your layouts, where and when does it work and where not?

That may be the intent, but not how it is working for us (Confluence 5.5.1). I have that code in our PDF Stylesheet. It works when we do a page export - there are page breaks on the headings. However, when we use the space custom export, it doesn't do page breaks on the headings. So, I figured I had to convert to html and put in the PDF Layout. Right now, the custom exports have become useless to us because there are no page breaks where they should be. Thus, we cannot generate any of our client-facing user or admin guides.

Also, our PDF layout includes the addition of a title page, a copyright statement page and a TOC. These are only applied for a space export and not a page export.

You never know, but to my knowledge there should be no difference between page exports and custom space exports.

Have you tried with other formats? Perhaps you could create a simple testpage and experiment with a few things like page breaks, font colors and the likes. If they work in the two different exports, you would know that the page break problem must have another explanation and could try to correct that.

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 Friday 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...

299 views 11 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