Forcing page breaks before topic headings

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
CanAussie
Propeller Head
Posts: 87
Joined: Wed Jul 16, 2008 7:45 pm

Forcing page breaks before topic headings

Post by CanAussie »

Hi,

This is driving me nuts.

I am using Flare 4.2, exporting to PDF and have my headers set to always break before.

When I export to PDF, I have about half a dozen that do not work. The headers appear on the bottom of the previous topic's page.

I am using the correct header and medium.

I saw a thread somewhere about Flare being buggy this way. If that is not true, what else could it be?

I did fix a couple by put paragraph tags all the way down the page on the previous topic. A band aid solution that didn't work for all the errant pages.

Cheers,

CanAussie
carolynmwallace
Sr. Propeller Head
Posts: 168
Joined: Thu Jan 31, 2008 12:21 pm
Location: Durham, NC

Re: Forcing page breaks before topic headings

Post by carolynmwallace »

Have you looked at any of the errant headings in the Internal Text Editor to see if there is something funny with the code? Sometimes weird little things creep in.

For example, if you had a header wrapped in some other type of tag (p, ul, ol, etc.), that could cause problems. In the Internal Text Editor that might look like this:
<p>
<h1>Header Text</h1>
</p>

Or if an unusual style has been applied, that could also cause problems. (I have a paragraph style called "Caption" that got applied to one of my headers...I have no idea how it happened!)
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Forcing page breaks before topic headings

Post by KevinDAmery »

Another thing that would cause this is having empty paragraphs after the headings. For example:

Code: Select all

<h1>Heading Text</h1>
<p></p>
<p>Paragraph text blah blah blah you get the idea.</p>
In this case, the break would actually occur after the first p tag, but since it's empty you would never see it so it would look like the break was after the h1 tag.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
CanAussie
Propeller Head
Posts: 87
Joined: Wed Jul 16, 2008 7:45 pm

Re: Forcing page breaks before topic headings

Post by CanAussie »

G'day,

Thank you for your suggestions. I did find some empty p tags but getting rid of them made no difference.

More hair-pulling ahead.

Cheers,

CanAussie
jacortes
Propeller Head
Posts: 45
Joined: Thu Oct 16, 2008 1:11 pm

Re: Forcing page breaks before topic headings

Post by jacortes »

Anyone else take a shot in the dark and figure this out?

It is truly maddening to see a page break placed at the end of a topic just go ignored when the pdf compiles. Like CanAussie, my headings are clean and not working:

<h1 class="PgBrkHeadingLevel1">My Heading</h1>

Then, I go back into the previous topic and place a page break and STILL can't get "My Heading" on the next page!
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Forcing page breaks before topic headings

Post by doc_guy »

You verified that you made the change in the PRINT section of your style sheet?

Can you post the H1.PgBrkHeadingLevel1 style from the print section of your stylesheet? Can you also print a sample of the source code of a topic that isn't breaking properly?
Paul Pehrson
My Blog

Image
CanAussie
Propeller Head
Posts: 87
Joined: Wed Jul 16, 2008 7:45 pm

Re: Forcing page breaks before topic headings

Post by CanAussie »

G'day,

I sent my project to Madcap Support last week but haven't heard anything back. I'll update this thread with their reply.

CanAussie
jacortes
Propeller Head
Posts: 45
Joined: Thu Oct 16, 2008 1:11 pm

Re: Forcing page breaks before topic headings

Post by jacortes »

Doc Guy,
Thanks for your interest! (First time quoter here, so I hope this works...)
doc_guy wrote:You verified that you made the change in the PRINT section of your style sheet?
Yes. Although, I definitely can see how this is a source of error. If you set a style property in DEFAULT mode (using Advanced View), when you view that style property in PRINT mode it appears set. I went into the .css and changed it so the page-break-after setting was under the @media Print section. That didn't make a lick of difference though when I pushed to PDF. :evil:
doc_guy wrote:Can you post the H1.PgBrkHeadingLevel1 style from the print section of your stylesheet?
Sure.

Here's the default properties for my style:
h1.PgBrkHeadingLevel1
{
font-size: 14pt;
font-family: Arial;
page-break-after: avoid;
margin-bottom: 0em;
font-weight: bold;
font-style: normal;
}

And here's the @media Print properties for my style:
h1.PgBrkHeadingLevel1
{
margin-bottom: 0.67em;
font-size: 16pt;
page-break-before: always;
}
doc_guy wrote:Can you also print a sample of the source code of a topic that isn't breaking properly?
Here's a snapshot of the beginning xml code:
<body>
<h1 class="PgBrkHeadingLevel1">FMDS Management Console </h1>
<p class="BodyHeadingLevel1">
<MadCap:keyword term="FMDS:management console;Management console" />The <span class="AppWindowName">FMDS Mangement Console</span> is the interface by which you can manage FMDS. From this window, you can perform these tasks:<MadCap:concept term="Console" /><MadCap:concept term="Overview" /></p>


As I mentioned before, when this didn't work, I went to the topic that preceeds this one and added a page break paragraph style that has worked on other topics, and it STILL wouldn't drop this topic onto the next page in the PDF. If you see an error with something I did (not uncommon :) ), I'd love to know!

Otherwise, like rebooting your CPU when it starts typing backwards, I think I'm just going to blow up the entire topic, rewrite it, and pray. (Er...maybe that's pray, rewrite the topic, and then blow up the old one.)
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Forcing page breaks before topic headings

Post by LTinker68 »

Did you set orphan and widow controls on any of the tags? I would assume the page-break-before would override the orphan/widow control, but maybe not. Especially if the orphan/widow control is on the <p> tag after the h1 tag and moving them to the next page violates the widow/orphan parameters. Although if you have your XML Editor set to the Print view then it usually shows where an orphan/widow control changed the positioning of something.

What follows the BodyHeadingLevel1 paragraph? Is there a really big picture or something that takes up the whole page or enough of it that it can't put the paragraph and heading on the same page? Also, what are the page-break settings on the p.BodyHeadingLevel1 tag?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
jacortes
Propeller Head
Posts: 45
Joined: Thu Oct 16, 2008 1:11 pm

Re: Forcing page breaks before topic headings

Post by jacortes »

Hi Lisa,
Good ideas.
LTinker68 wrote:Did you set orphan and widow controls on any of the tags?
I have not messed with either of those controls for the <h1> or <p> styles. For <h1>, they are not set. For the <p> they are set to 3. I am guessing the latter is a default setting, but it shouldn't cause this problem.
LTinker68 wrote:What follows the BodyHeadingLevel1 paragraph? Is there a really big picture or something that takes up the whole page or enough of it that it can't put the paragraph and heading on the same page?
A list follows the BodyHeadingLevel1 style. Just three bullets with links to tasks. A screenshot does follow the lists, but if the heading was breaking correctly, it and the bullets would definitely fit on the page with the screenshot. To test, I conditionalized out the screenshot for my last pdf (leaving just the heading, paragraph and bullet list), but still no break.
LTinker68 wrote:Also, what are the page-break settings on the p.BodyHeadingLevel1 tag?
The page break controls for the BodyHeadingLevel1 are not set.

Thanks for your response!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Forcing page breaks before topic headings

Post by LTinker68 »

Get the topic that's not breaking properly and the topic that appears just before that topic and open them both in the Internal Text Editor. See if one of them has a bunch of empty tags at the end of the topic and/or inline styles somewhere that are overriding what you have set in the stylesheet.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Robotman
Sr. Propeller Head
Posts: 186
Joined: Sat Mar 04, 2006 3:05 am
Location: Melbourne, Australia
Contact:

Re: Forcing page breaks before topic headings

Post by Robotman »

If these suggestions don't work, what I did was to create a new TOC (for testing purposes, just do three or four topics initally that you know were causing you grief).
\m/ Gary \m/
Flare 2024
Screaming Symphony
CanAussie
Propeller Head
Posts: 87
Joined: Wed Jul 16, 2008 7:45 pm

Re: Forcing page breaks before topic headings

Post by CanAussie »

G'day,

I heard back from Support and they can reproduce the issue but are still trying to figure out why.

In the meantime, they advised me to create a <p class> with page break set to always and place it at the end of the page. That works.

Cheers,

CanAussie
papa-mike
Propeller Head
Posts: 16
Joined: Fri Mar 03, 2006 10:07 am
Location: Israel
Contact:

Re: Forcing page breaks before topic headings

Post by papa-mike »

I have added myself to this problem as I have the same problem and NO hair left.
Since I have a few hundred page breaks required I DO NOT want to add a page break to each one of the topics. They are tables containing command parameters and MUST be on a new page.
BTW what do you mean add a <P> style at the end of the page?
Mike
CanAussie
Propeller Head
Posts: 87
Joined: Wed Jul 16, 2008 7:45 pm

Re: Forcing page breaks before topic headings

Post by CanAussie »

G'day,

Sorry to hear of the hair or lack there of.

On the bottom of the page where the next page's header is errantly displaying, I add this p class that I created:

<p class="ForceBreak"> </p>

It is set to always break after.

That boots the errant header to the next page.

CanAussie
papa-mike
Propeller Head
Posts: 16
Joined: Fri Mar 03, 2006 10:07 am
Location: Israel
Contact:

Re: Forcing page breaks before topic headings

Post by papa-mike »

Thank you my good man that will definately help all 257 times.
What about the header stuff?
Mike
Post Reply