Vincent Hennebert wrote:

Hi,

I’m suddenly all confused about the supposedly expected behaviour of breaks. Please have a look at the attached FO file and its PDF result.

We get 2 pages. The break-before on the outer block and the inner block are “merged” into just one... Why?

Well I can't explain it from a spec point of view. However, the current behaviour is what the users would expect. In my mind there is no business scenario where a page would contain just the top border of a block and nothing more. And if there was such a use case then there are far more straight forward ways of reaching such an affect, namely:

<fo:block border-top="solid 1pt black" break-after="page">&nbsp;</fo:block>

Now if there is some text content between the two breaks then both the inner and outer blocks should generate breaks, but there will be some text on page 2 so this has a business use case.


Section 4.8, “Keeps and Breaks” of XSL-FO 1.1 states that “A break-before condition is satisfied if the first area generated and returned by the formatting object is leading within a context-area.”

I could then expect that the outer block generates an empty area on page 2, with a red border-before, plus another area on page 3 (also with a red border due to the “retain”) containing the area generated by the inner block. I mimicked that in the break-before-alt.pdf file.

I don’t think anything in the spec contradicts this interpretation. I’m not even sure whether the current behaviour is more desirable from a user-friendliness point of vue or not.

I think the current behaviour is more user friendly, but thats just my opinion. In either case if the spec is unclear then common sense should prevail. I'm interested to hear what other's think.

Chris


Reply via email to