Can I avoid a Page Break after some H1 headers but not all in PDF Export?

Hi,

Version: Confluence 5.5.6 : 

 

I've searched the user guides/forums but cannot find a specific answer to this question, maybe someone else has come across this before: 

In some scenarios I have : 

H1  : Heading 

         Info 

         Supplementary info 

         H2 : Sub Topic of H1 

 

In other scenarios I have : 

H1 Heading 

H2: Subtopic of H1 

H2: another Subtopic of H1

 

In scenario 1 -  I want there to be a page break before H2 however in scenario 2 I do not want there to be a page break as it results in one long empty page before h2 in the PDF export. Can I customize this using the PDF stylesheet? 

 

Similar queries that do not address this issue include: 

https://answers.atlassian.com/questions/314427

https://confluence.atlassian.com/display/DOC/Advanced+PDF+Export+Customisations#AdvancedPDFExportCustomisations-RelatedTopics

https://answers.atlassian.com/questions/68373.

 

Thanks 

2 answers

1 accepted

@Pamela Sheridan

I guess manually adding page breaks as described by Steven will be the easiest and most failure-proof solution for your case.

If you really want to try with an automatic solution search for "adjacent sibling combinator" and build something around h1+h2 { ... }

 

 

Hi Pamela,

have you already had a look at the Scroll PDF Exporter?

Using this you can either insert specific page-breaks on your Confluence pages directly (see Adding Pagebreaks), or generate multiple templates, one with pagebreaks before every H2 and one without any pagebreaks (see Enforcing Pagebreaks).

Does this help?

Best,
Nils

Thanks Nils! Yes , we don't have access to Scroll PDF exporter so I'm trying this using the CSS, my problem is the two scenarios above occur in the same document (its a very large document) so I need page breaks in some chapters but not in others (I've tried page-break : auto, left , right etc) ... Ill see if I can create a similar user macro to 'Disable Pagebreaks' that could be the possible solution - thanks for you suggestions and rapid response - really appreciated!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Monday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

226 views 3 3
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