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

Pamela Sheridan January 6, 2015

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

0 votes
Answer accepted
Steffen Heller
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 Leaders.
August 19, 2015

@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 { ... }

 

 

0 votes
Nils Bier _K15t_
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 Leaders.
January 6, 2015

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

Pamela Sheridan January 6, 2015

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

Atlassian Community Events