[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

FO: How to improve page breaks

Subject: FO: How to improve page breaks
From: Michael Müller-Hillebrand <mmh@xxxxxxxxx>
Date: Wed, 19 Feb 2014 15:44:53 +0100
 FO: How to improve page breaks
Hi colleagues,

For project managers it is always simple to justify the cost savings by
avoiding DTP after having implemented a direct-to-PDF XSL-FO process. However,
editors sometimes have the impression that automated layout will never be as
good as manually fine-tuned pages. I take this as a constant challenge to
surprise users that FO processing is not only consistent but can also be
(almost as) clever as a human DTP specialist.

My current challenge is page breaks. A recurring problem is the following
situation (I use HTML for markup examples):

<div>
  <p class="heading">Some heading</p>
  <p>A first paragraph.</p>
  <img src="url" />
  <p>Even more text.</p>
  <!-- rest of content -->
</div>

This topic should flow with the rest of the content. Everything is fine as
long as the introductory <p> ends up on the same page as the following image.
But if the image is pushed to the next page, the resulting page break is at a
perceived wrong position if the first <p> has only short content. It would be
fine, though, if this <p> contains a lot of text.

We do not want to introduce user-editable attributes to manually control
page-breaks. And we want to avoid two-pass processing.

What we already did to avoid that headings appear near the bottom of a page is
the insertion of
<fo:float float="start">
 <fo:block-container height="20mm"/>
</fo:float>
at the beginning of every <p class="heading"> (apart from the obvious
keep-with-next).

This forces every heading appearing in the bottom 20mm to be pushed to the
next page.

I think I am now looking for something that keeps the heading + the following
20mm of content on the same page.

Are there other options I might have overlooked, or is FOPRunXSLText recently
mentioned by Tony Graham the way I should go?

Thanks a lot for comments,

- Michael

--
Michael M|ller-Hillebrand
mmh@xxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.