Page break in PDF before heading

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
ladyrae
Propeller Head
Posts: 20
Joined: Fri Apr 25, 2008 11:19 am
Location: Somerville, MA

Page break in PDF before heading

Post by ladyrae »

Hi! Hopefully this one has an easy answer!

I'm trying to learn how to use the single source feature in Flare to create both Webhelp and PDF outputs. In the topic I'm using to experiment, there are several autonumbered sections, and for some reason, a page break is being placed before the auto numbered headings.

I've gone into the stylesheet and properties to make sure page breaks are set to 'avoid' for these, and that the correct stylesheet is associated with the topic and target, but the page breaks are still happening for the PDF output. There is a page break icon showing when I look at the 'Print Layout', but when I hover over it says 'Avoided Page Break'.

The Webhelp looks fine (obviously no page breaks there!). Strangely, if I go into the PDF target and change the output type from PDF to Word, those page breaks disappear for the Word output. Since the only thing I changed was whether it was going to PDF or Word (didn't change the page layout, stylesheet or anything else), it seems like this is just an issue with the PDFs. Any idea on how I might fix this?

Thank you!

-Rachael
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Page break in PDF before heading

Post by SteveS »

Hi Rachael,

If the output is varied between the 2 types of printed output it strongly suggests you've found a bug.

Make sure you report it here. I'd also contact support if you have a maintenance contract.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page break in PDF before heading

Post by LTinker68 »

ladyrae wrote:I've gone into the stylesheet and properties to make sure page breaks are set to 'avoid' for these...
Page-break-before or page-break-after? Also, check the widows and orphans values.

Could you post the online (default medium) and print (print medium) styles for the auto-numbering style that's breaking?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ladyrae
Propeller Head
Posts: 20
Joined: Fri Apr 25, 2008 11:19 am
Location: Somerville, MA

Re: Page break in PDF before heading

Post by ladyrae »

I haven't set the widow and orphan values. What should those be in order to avoid page breaks? I'd be surprised if they were affecting this though, since none of the headings go to a second line. They are all just a few words long at the most.

The first style listed is the style in the stylesheet I'm using for the printed output.

h2
{
font-family: arial;
margin: .60em 0;
color: #375579;
mc-auto-number-position: outside-head;
font-size: 120%;
font-weight: normal;
margin-top: 20px;
margin-left: 20px;
mc-auto-number-format: '{n+}. ';
mc-auto-number-offset: 25px;
column-break-after: avoid;
page-break-after: avoid;
page-break-before: avoid;
column-break-before: avoid;
column-break-inside: avoid;
page-break-inside: avoid;
}

This second one is the stylesheet for the Webhelp.

h2
{
font-family: arial;
margin: .60em 0;
color: #375579;
mc-auto-number-position: outside-head;
font-size: 120%;
font-weight: normal;
margin-top: 20px;
margin-left: 20px;
mc-auto-number-format: '{n+}. ';
mc-auto-number-offset: 25px;
}

Thank you!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page break in PDF before heading

Post by LTinker68 »

First thing I usually suggest to someone when they have such long style definitions is to start from scratch on the styles. Make a copy of the stylesheet outside of the project, then open the stylesheet in the Internal Text Editor and delete all the styles for the <h2> tag, both in the default medium and the print medium. Then add properties one-at-a-time until you find the problem and/or get the appearance you want. Most likely what happened is that you inadvertently created conflicting properties in the style. To test for the PDF, I'd make a new PDF test target with a test TOC that has only a few topics in it. Just enough so that you can see if the heading breaks properly. That'll be faster than building the entire project while you're testing the styles.

I have a feeling that the problem may be the outside-head property. There have been some other problems posted with auto-numbering that was set to outside-head. I can't remember what the issues are, but you could start there. I think you can create the same effect by using inside-head, setting a margin-left on the paragraph, and setting a negative margin-left on the span, so that the auto-numbering appears to the left of the paragraph.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ladyrae
Propeller Head
Posts: 20
Joined: Fri Apr 25, 2008 11:19 am
Location: Somerville, MA

Re: Page break in PDF before heading

Post by ladyrae »

Hi Lisa,

I followed your advice and it lead me to an interesting discovery. This is not a problem with my stylesheet at all, it's something wrong in the topic itself, or at least with one line in the topic. A page break is being inserted where one does not belong - I don't even see it in the code! I've confirmed this by using the style in other topics and not encountering the problem.

Also, no matter what style I select, even if I use the plain P style, which has no autonumbering, Flare is assigning it an autonumber. This does show in the code, but I have no idea why it would be autonumbered, that seems to come out of nowhere. I'm puzzled. Maybe the topic is corrupt?

Fortunately this is a really small topic so I can easily create a fresh page, cut and paste the relevant parts, and skip the problem line!

Thanks for your help!

-Rachael
Post Reply