[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|