The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How Do I Keep a Heading with the Following Text?

Catherine Anderson
July 29, 2022

I am pdfing a Confluence page and want to keep the heading with the text that follows. Right now, the heading appears at the bottom of the page and the text at the top of the next page. How can I prevent that?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 30, 2022

Welcome to the community, @Catherine Anderson ! I will assume you are using the builtin PDF export function. What you need to do is to edit/update the CSS stylesheet for the PDF export and add the following property to your headings,

page-break-after: avoid;

For example:

h1 {
margin-top: 20pt;
margin-bottom: 10pt;
font-size: 20pt;
page-break-after: avoid;
}

It may not always work, but it can help with keeping headings from separating across a page.

Details on editing the CSS are here:

https://support.atlassian.com/confluence-cloud/docs/customize-exports-to-pdf/ 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events