[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSL:FO Problem of controlling page breaks

Subject: Re: [xsl] XSL:FO Problem of controlling page breaks
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Jan 2005 08:59:07 -0500

At 2005-01-14 13:41 +0000, Vasu Chakkera wrote:
I have a complicated looking problem

Thankfully it isn't a complicated answer.

 I have in my XML sections with titles , may be some information of some
 tables etc.. What happens now is that when the PDF is generated, then
 sometimes the Title appears in the bottom of the page and then the Contents
 under the title comes up in the next page. What I really need is , If there
 are less than 3 lines in the page under the Title, before the page ends,
 then the whole Title and the Text must come in the next page.

Think of it as "if both the given area and the following area don't fit on the page, move both to the next page".

XSL-FO doesn't have a concept of keeping track of the number of lines available on a page.

But it does have the concept of "keeping things together".

So No Title
 should be in a page with out a minimum of three lines under it. If less
 three, then the title shud be in the next page. Is there any one out there
 who can fish me out of this??

Think of it as "For this area (title), keep it on the same page as the next area (table of contents)":

  <block keep-with-next="always">

I hope this helps.

......................... Ken

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread