Hi Vincent, Thanks for the answer. Luckily this problem solved itself, because the breaking rules I need to implement are simpler than they seemed at first.
Regards, Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: Vincent Hennebert [mailto:vhenneb...@gmail.com] Gesendet: Freitag, 23. Januar 2009 17:16 An: fop-users@xmlgraphics.apache.org Betreff: Re: W: AW: Keep-together.within-page in FOP 0.95 Hi Georg, Georg Datterl wrote: > Hi Jeremias, > > I finally came around to testing your keep-together with numbers and it did > not quite work as I did not expect anyway. > > Let's assume I have one block with five child blocks. If all five blocks fit > on one page, keep them on one page. Otherwise break between block 3 and 4. If > any block alone is too big for one page, break it where necessary. > > <block keep-together.within-page="1" > > <block keep-together.within-page="3" >(block 1 content)</block> > <block keep-together.within-page="3" >(block 2 content)</block> > <block keep-together.within-page="2" >(block 3 content)</block> > <block keep-together.within-page="3" >(block 4 content)</block> > <block keep-together.within-page="3" >(block 5 content)</block> > </block> > > should that work? do I need more wrapping blocks like maybe one block around > blocks 1-3 and one around 4 and 5? I think so. Something like this: <block keep-together.within-page="1"> <block keep-together.within-page="2"> <block keep-together.within-page="3">(block 1 content)</block> <block keep-together.within-page="3">(block 2 content)</block> <block keep-together.within-page="3">(block 3 content)</block> </block> <block keep-together.within-page="2"> <block keep-together.within-page="3">(block 4 content)</block> <block keep-together.within-page="3">(block 5 content)</block> </block> </block> However this is all theoretical, since FOP currently handles all integer values the same way; that is, set a very high penalty for breaking inside the block, but not forbid it completely. The idea is to encourage the algorithm to favour layouts without breaks over those with breaks. While this might not always be the case, the hope is that this is what will happen for most real-life documents. To achieve what you need integer keeps would have to be fully implemented. I don't think there is any solution other than that, unfortunately. > Regards, > > Georg Datterl HTH, Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org