Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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://answers.atlassian.com/questions/68373.
Thanks
@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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.