Hi Rob, There’s a bug in the layout engine that doesn’t take the name of the region-body into account when breaking pages.
In the example you attached, your empty page (from page-master "header-gallery6-page-3") appears to have a region-body of 28.08pt high. This is enough to fit 2 lines of text, which is what the PageBreakingAlgorithm does. At area creation time though, there is a test to check if the region-name of the current region-body matches the flow-name of the fo:flow the text belongs to. If it doesn’t, then the content is pushed to the next page. This creates a shift between what the layout engine does and what the area creator does. In the present case, the two-line content is pushed to the next page that can accommodate 20 lines or so, and the 20-line content that was supposed to be on that page is itself pushed to the following page that has full height (45-ish lines). Please report a bug at https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop It would be great if you could simplify your example as much as possible and attach it to the bug report. In the meantime, the following workaround might work: define the size of the empty page’s region-body to /exactly/ match the sizes of /all/ the following pages, until (I think) you insert a forced page break or start a new page sequence. The shift will still happen, but will be unnoticeable since the sizes of the region-bodies will all match. That said, in the provided example you can just remove the region-name property from the region-body of the "header-gallery6-page-3" page-master, and define margins on that region such that its height is zero (basically, change the margin-bottom from 0.01in to 0.40in). The empty body will be skipped by the layout engine, the area creator will create zero area for that page and both will agree, and you should get the result you expect. HTH, Vincent On 07/05/12 11:51, Rob Sargent wrote: > Attached a test fo > > On 05/06/2012 04:02 PM, Rob Sargent-4 wrote: >> Thanks to a pointer from Chris Bowditch I'm using the fop trunk as of 2 days >> ago to see if I can pull this off. >> >> His hint on how to get the flow to skip a page: >> <fo:simple-page-master master-name="nocontent"> >> <fo:region-body region-name="doesntexist"/> >> </fo:simple-page-master> >> >> My result: >> The textless page is fine but it affects the next page(s). Unfortunately I >> get little or no text on the immediate following page(s) The correct textual >> content is picked up a page(s) later. I'm wondering if anyone else out there >> is using region-name like this in production (or plans to) or has seen my >> problem and dealt with it at all. >> >> I have one case where the output is perfect-pages, textless-page, >> unintentional-textless page, another-one, textless-page, >> perfectly-fine-pages-of-text. Almost as if the textless-page is toggling >> off-on the addition of text to the flow. >> >> Or Vincent will get another nasty fo from me. :) >> >> Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
