Page break for every H1

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
flared
Jr. Propeller Head
Posts: 4
Joined: Sat Jun 11, 2022 1:49 pm

Page break for every H1

Post by flared »

I have a printed PDF book made up of topics that all start with H1. Is there a way to set it up so every topic starts on a new page? I am trying to avoid having any headings (h1) at the bottom of a page.
AlexFox
Sr. Propeller Head
Posts: 246
Joined: Thu Oct 19, 2017 1:56 am

Re: Page break for every H1

Post by AlexFox »

You can use a CSS rule:

Code: Select all

h1
{
	page-break-before: always;
}
dpwriter
Jr. Propeller Head
Posts: 3
Joined: Wed Nov 27, 2024 7:17 am

Re: Page break for every H1

Post by dpwriter »

I set the "page-break-before: always;" for an H1 style, but get not only a page break, but a blank page before every H1.

Why is that?
AlexFox
Sr. Propeller Head
Posts: 246
Joined: Thu Oct 19, 2017 1:56 am

Re: Page break for every H1

Post by AlexFox »

dpwriter wrote: Wed Nov 27, 2024 7:28 am I set the "page-break-before: always;" for an H1 style, but get not only a page break, but a blank page before every H1.

Why is that?
Honestly it could be many things. I'd suggest looking at any setting you might have at target level to inject empty pages (Advanced tab) and any settings at TOC Printed Output level for "Auto-end on 'left' page". Try disabling them if they're enabled and see what happens.
dpwriter
Jr. Propeller Head
Posts: 3
Joined: Wed Nov 27, 2024 7:17 am

Re: Page break for every H1

Post by dpwriter »

Finally figured it out. After looking into every possible way a page break could be inserted, I found a problem in a page layout file. My left page layout had a frame mis-typed as a header in place of a body frame.

This led to many strange symptoms, including a PDF ToC entry that pointed to a blank page.

Some of my hair is left.

Thanks for the tips! They kept me sane...
Post Reply