You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Rania Saghira <Ra...@trax.aero> on 2008/12/17 22:16:41 UTC

Keep-together.within-page in FOP 0.95

Hello,

I am using FOP 0.95 to convert my XML documents to PDF format. With previous versions of FOP i was able to use the keep-together="always" to have my table content start on the next page if this does not fit in the current page. I read that the keep-together.within-page="always" should be equivalent to the keep-together="always" in FOP 0.25. This works in some cases, however if the row is larger than the page the content is overwriting the footer. How can i fix this?
Any help is really appreciated.

Best Regards,
Rania

Re: Keep-together.within-page in FOP 0.95

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
That's difficult if I don't know what your document looks like or is
supposed to look like.

If your have something like:
<fo:block keep-together.withing-column="always">
  <fo:block>
    <fo:block>first part</fo:block>
  </fo:block>
  <fo:block>
    <fo:block>second part</fo:block>
    <fo:block>blah blah/fo:block>
  </fo:block>
</fo:block>

..you can instead do something like:
<fo:block>
  <fo:block keep-together.withing-column="always">
    <fo:block>first part</fo:block>
  </fo:block>
  <fo:block keep-together.withing-column="always">
    <fo:block>second part</fo:block>
    <fo:block>blah blah/fo:block>
  </fo:block>
</fo:block>

Obviously, that's not the same semantically. If you can't find
work-arounds like that, you either have to live with unwanted breaks or
with overflows. More fine-grained control over keeps is not possible
with 0.95.

On 18.12.2008 14:17:15 Rania Saghira wrote:
> Well can you give me an example for another way to accomplish this.
> Problem is that for now we cannot migrate to the FOP Trunk, so we need to find a solution in FOP 0.95.
> 
> Any help is really appreciated.
> Regards,
> Rania
> 
> 
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Thursday, December 18, 2008 3:31 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Keep-together.within-page in FOP 0.95
> 
> You can fix this by not using a keep or by a more fine-grained use of keeps. Furthermore, I've implemented partial support for integer values on keeps in FOP Trunk. The strengths are not yet respected but contrary to "always", an integer value allows FOP to break a section if it would result in an overflow otherwise. HTH
> 
> On 17.12.2008 22:16:41 Rania Saghira wrote:
> > Hello,
> >
> > I am using FOP 0.95 to convert my XML documents to PDF format. With
> > previous versions of FOP i was able to use the keep-together="always"
> > to have my table content start on the next page if this does not fit
> > in the current page. I read that the
> > keep-together.within-page="always" should be equivalent to the
> > keep-together="always" in FOP 0.25. This works in some cases, however
> > if the row is larger than the page the content is overwriting the footer. How can i fix this?
> > Any help is really appreciated.
> >
> > Best Regards,
> > Rania
> 
> 
> 
> 
> Jeremias Maerki
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Keep-together.within-page in FOP 0.95

Posted by Rania Saghira <Ra...@trax.aero>.
Well can you give me an example for another way to accomplish this.
Problem is that for now we cannot migrate to the FOP Trunk, so we need to find a solution in FOP 0.95.

Any help is really appreciated.
Regards,
Rania


-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Thursday, December 18, 2008 3:31 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Keep-together.within-page in FOP 0.95

You can fix this by not using a keep or by a more fine-grained use of keeps. Furthermore, I've implemented partial support for integer values on keeps in FOP Trunk. The strengths are not yet respected but contrary to "always", an integer value allows FOP to break a section if it would result in an overflow otherwise. HTH

On 17.12.2008 22:16:41 Rania Saghira wrote:
> Hello,
>
> I am using FOP 0.95 to convert my XML documents to PDF format. With
> previous versions of FOP i was able to use the keep-together="always"
> to have my table content start on the next page if this does not fit
> in the current page. I read that the
> keep-together.within-page="always" should be equivalent to the
> keep-together="always" in FOP 0.25. This works in some cases, however
> if the row is larger than the page the content is overwriting the footer. How can i fix this?
> Any help is really appreciated.
>
> Best Regards,
> Rania




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


symbol support

Posted by "Li, Hao" <li...@peacetech.com>.
Hi,

It is great to find that FOP trunk is now supporting rendering Symbols (ie Greek characters) directly without all the tricks. However the issues are:

1. the symbol appears not lined up with other characters
2. may not be rendered if inside single or double quote

There could be some configurations that I do not know of. Please shed me lights.

Your help is greatly appreciated,

Hao Li

AW: W: AW: Keep-together.within-page in FOP 0.95

Posted by Georg Datterl <ge...@geneon.de>.
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:vhennebert@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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: W: AW: Keep-together.within-page in FOP 0.95

Posted by Vincent Hennebert <vh...@gmail.com>.
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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


AW: AW: W: AW: Keep-together.within-page in FOP 0.95

Posted by Georg Datterl <ge...@geneon.de>.
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? 

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 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: AW: W: AW: Keep-together.within-page in FOP 0.95

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 18.12.2008 13:17:17 Georg Datterl wrote:
> Hi Jeremias,  
> 
> I'll try that next year. I have quite a complicated table who should be
> kept together except if it spans more than a page. Speaking of tables:
> Given a table with two rows, two columns, cell in first column spans
> both rows, is there a way to tell FOP: If there's a break between this
> two rows, repeat the content of the split cell on next pages? 

No.

> I read the specification, but I did not quite understand it. Always
> means "never break" and auto means "break, wenever you feel like it".
> But numbers would mean, a keep or break can influence other keeps or
> breaks. I can see a keep-with-next clash with a break-before or the
> other way round or a keep on a block clash with a break on a sub-block,
> but which strength does a "break because end of page/column/line is
> reached" have?

A break is always stronger than any keep.

> Or a "break because otherwise it would not fit the page"?

That's basically what the integer values allow.

> Everything very complicated...

Yeah, there you see what we have to build here.

> 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: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
> Gesendet: Donnerstag, 18. Dezember 2008 12:43
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: W: AW: Keep-together.within-page in FOP 0.95
> 
> On 18.12.2008 12:10:27 Georg Datterl wrote:
> > Hi Jeremias,
> > 
> > > <block keep-together.within-column="1">  <block>I use 30% 
> > > height</block>  <block>I use 30% height</block>  <block>I use 50% 
> > > height</block> </block> In this case, the 50% block is moved to the 
> > > next page if the layout engine doesn't find a better solution, for 
> > > example by keeping the first block on the previous page and keeping 
> > > the latter two together. (all assuming those nested blocks are 
> > > unbreakable for example by carrying a
> > > keep-together.within-column="always")
> > 
> > So, without a keep-together.within-column, the sequence would be:
> > most preferable break: after third block. (impossible, since 110%) 
> > less preferable: after second block. (possible, if blocks before take 
> > <= 40%) even less preferable: after first block. (possible, if blocks 
> > before take 41% to 70%) even less preferable: before first block. 
> > (possible, if blocks before take >71% )
> 
> It's difficult to say exactly that as this also depends on the surrounding content if any. A break before the first block will never happen if the content above is the only content in the document.
> 
> > => Meaning: fit as much as possible on the previous page
> 
> More or less, yes.
> 
> > So, with keep-together.within-column="1", the sequence would be (from your description):
> > most preferable break: after third block. (impossible, since 110%) 
> > less preferable: after first block. (possible, if blocks before take 
> > <= 70%) even less preferable: after second block. ( would only happen 
> > if block2+block3 would use more than 100% and blocks before block1 
> > would take <=40%) even less preferable: before first block. (possible, 
> > if blocks before take >71% )
> 
> Hmmm. At least what you can say is that the most preferable break is after the third block. Whether then the break possibility after the first or second block is more preferable depends on the surrounding content.
> 
> > I don't understand why. 
> 
> I hope the above clears that up a bit. However, if you want an exact description of how this works I have to give you a pointer into the
> spec:
> http://www.w3.org/TR/xsl11/#keepbreak
> That explains everything though maybe in a very technical way and without examples.
> 
> > Of course my example was buggy, I meant: keep-with-next, not keep-together. 
> 
> :-)
> 
> > What I was trying to say is: keep-with-next if in any way possible.
> > Separate from next ONLY if both blocks together would never ever fit 
> > on a page, since they take more than 100%.
> > 
> > <block> I use 30% height</block>
> > <block keep-with-next="1"> I use 30% height </block>
> 
> I don't really like the use of the shorthand. That can lead to nasty side-effects, especially with keep-together.
> 
> > <block>I use 50% height</block>
> > 
> > would break before the second block, but
> 
> Yes.
> 
> > <block> I use 30% height</block>
> > <block keep-with-next="1"> I use 30% height </block> <block>I use 80% 
> > height</block>
> > 
> > would break after the second block. 
> 
> Yes.
> 
> <snip/>
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


AW: W: AW: Keep-together.within-page in FOP 0.95

Posted by Georg Datterl <ge...@geneon.de>.
Hi Jeremias,  

I'll try that next year. I have quite a complicated table who should be kept together except if it spans more than a page. Speaking of tables:
Given a table with two rows, two columns, cell in first column spans both rows, is there a way to tell FOP: If there's a break between this two rows, repeat the content of the split cell on next pages? 

I read the specification, but I did not quite understand it. Always means "never break" and auto means "break, wenever you feel like it". But numbers would mean, a keep or break can influence other keeps or breaks. I can see a keep-with-next clash with a break-before or the other way round or a keep on a block clash with a break on a sub-block, but which strength does a "break because end of page/column/line is reached" have? Or a "break because otherwise it would not fit the page"?

Everything very complicated...

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: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Gesendet: Donnerstag, 18. Dezember 2008 12:43
An: fop-users@xmlgraphics.apache.org
Betreff: Re: W: AW: Keep-together.within-page in FOP 0.95

On 18.12.2008 12:10:27 Georg Datterl wrote:
> Hi Jeremias,
> 
> > <block keep-together.within-column="1">  <block>I use 30% 
> > height</block>  <block>I use 30% height</block>  <block>I use 50% 
> > height</block> </block> In this case, the 50% block is moved to the 
> > next page if the layout engine doesn't find a better solution, for 
> > example by keeping the first block on the previous page and keeping 
> > the latter two together. (all assuming those nested blocks are 
> > unbreakable for example by carrying a
> > keep-together.within-column="always")
> 
> So, without a keep-together.within-column, the sequence would be:
> most preferable break: after third block. (impossible, since 110%) 
> less preferable: after second block. (possible, if blocks before take 
> <= 40%) even less preferable: after first block. (possible, if blocks 
> before take 41% to 70%) even less preferable: before first block. 
> (possible, if blocks before take >71% )

It's difficult to say exactly that as this also depends on the surrounding content if any. A break before the first block will never happen if the content above is the only content in the document.

> => Meaning: fit as much as possible on the previous page

More or less, yes.

> So, with keep-together.within-column="1", the sequence would be (from your description):
> most preferable break: after third block. (impossible, since 110%) 
> less preferable: after first block. (possible, if blocks before take 
> <= 70%) even less preferable: after second block. ( would only happen 
> if block2+block3 would use more than 100% and blocks before block1 
> would take <=40%) even less preferable: before first block. (possible, 
> if blocks before take >71% )

Hmmm. At least what you can say is that the most preferable break is after the third block. Whether then the break possibility after the first or second block is more preferable depends on the surrounding content.

> I don't understand why. 

I hope the above clears that up a bit. However, if you want an exact description of how this works I have to give you a pointer into the
spec:
http://www.w3.org/TR/xsl11/#keepbreak
That explains everything though maybe in a very technical way and without examples.

> Of course my example was buggy, I meant: keep-with-next, not keep-together. 

:-)

> What I was trying to say is: keep-with-next if in any way possible.
> Separate from next ONLY if both blocks together would never ever fit 
> on a page, since they take more than 100%.
> 
> <block> I use 30% height</block>
> <block keep-with-next="1"> I use 30% height </block>

I don't really like the use of the shorthand. That can lead to nasty side-effects, especially with keep-together.

> <block>I use 50% height</block>
> 
> would break before the second block, but

Yes.

> <block> I use 30% height</block>
> <block keep-with-next="1"> I use 30% height </block> <block>I use 80% 
> height</block>
> 
> would break after the second block. 

Yes.

<snip/>



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: W: AW: Keep-together.within-page in FOP 0.95

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 18.12.2008 12:10:27 Georg Datterl wrote:
> Hi Jeremias,
> 
> > <block keep-together.within-column="1">
> >  <block>I use 30% height</block>
> >  <block>I use 30% height</block>
> >  <block>I use 50% height</block>
> > </block>
> > In this case, the 50% block is moved to the next 
> > page if the layout engine doesn't find a better 
> > solution, for example by keeping the first block 
> > on the previous page and keeping the latter two 
> > together. (all assuming those nested blocks are 
> > unbreakable for example by carrying a
> > keep-together.within-column="always")
> 
> So, without a keep-together.within-column, the sequence would be:
> most preferable break: after third block. (impossible, since 110%)
> less preferable: after second block. (possible, if blocks before take <= 40%)
> even less preferable: after first block. (possible, if blocks before take 41% to 70%)
> even less preferable: before first block. (possible, if blocks before take >71% )

It's difficult to say exactly that as this also depends on the
surrounding content if any. A break before the first block will never
happen if the content above is the only content in the document.

> => Meaning: fit as much as possible on the previous page

More or less, yes.

> So, with keep-together.within-column="1", the sequence would be (from your description):
> most preferable break: after third block. (impossible, since 110%)
> less preferable: after first block. (possible, if blocks before take <= 70%)
> even less preferable: after second block. ( would only happen if block2+block3 would use more than 100% and blocks before block1 would take <=40%)
> even less preferable: before first block. (possible, if blocks before take >71% )

Hmmm. At least what you can say is that the most preferable break is
after the third block. Whether then the break possibility after the
first or second block is more preferable depends on the surrounding
content.

> I don't understand why. 

I hope the above clears that up a bit. However, if you want an exact
description of how this works I have to give you a pointer into the
spec:
http://www.w3.org/TR/xsl11/#keepbreak
That explains everything though maybe in a very technical way and
without examples.

> Of course my example was buggy, I meant: keep-with-next, not keep-together. 

:-)

> What I was trying to say is: keep-with-next if in any way possible.
> Separate from next ONLY if both blocks together would never ever fit
> on a page, since they take more than 100%.
> 
> <block> I use 30% height</block>
> <block keep-with-next="1"> I use 30% height </block>

I don't really like the use of the shorthand. That can lead to nasty
side-effects, especially with keep-together.

> <block>I use 50% height</block>
> 
> would break before the second block, but

Yes.

> <block> I use 30% height</block>
> <block keep-with-next="1"> I use 30% height </block>
> <block>I use 80% height</block>
> 
> would break after the second block. 

Yes.

<snip/>



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


W: AW: Keep-together.within-page in FOP 0.95

Posted by Georg Datterl <ge...@geneon.de>.
Hi Jeremias,

> <block keep-together.within-column="1">
>  <block>I use 30% height</block>
>  <block>I use 30% height</block>
>  <block>I use 50% height</block>
> </block>
> In this case, the 50% block is moved to the next 
> page if the layout engine doesn't find a better 
> solution, for example by keeping the first block 
> on the previous page and keeping the latter two 
> together. (all assuming those nested blocks are 
> unbreakable for example by carrying a
> keep-together.within-column="always")

So, without a keep-together.within-column, the sequence would be:
most preferable break: after third block. (impossible, since 110%)
less preferable: after second block. (possible, if blocks before take <= 40%)
even less preferable: after first block. (possible, if blocks before take 41% to 70%)
even less preferable: before first block. (possible, if blocks before take >71% )

=> Meaning: fit as much as possible on the previous page

So, with keep-together.within-column="1", the sequence would be (from your description):
most preferable break: after third block. (impossible, since 110%)
less preferable: after first block. (possible, if blocks before take <= 70%)
even less preferable: after second block. ( would only happen if block2+block3 would use more than 100% and blocks before block1 would take <=40%)
even less preferable: before first block. (possible, if blocks before take >71% )

I don't understand why. 

Of course my example was buggy, I meant: keep-with-next, not keep-together. 
What I was trying to say is: keep-with-next if in any way possible. Separate from next ONLY if both blocks together would never ever fit on a page, since they take more than 100%.

<block> I use 30% height</block>
<block keep-with-next="1"> I use 30% height </block>
<block>I use 50% height</block>

would break before the second block, but

<block> I use 30% height</block>
<block keep-with-next="1"> I use 30% height </block>
<block>I use 80% height</block>

would break after the second block. 

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 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: AW: Keep-together.within-page in FOP 0.95

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I don't understand your example. I'll post one of my own:

<block keep-together.within-column="always">
  <block>I use 30% height</block>
  <block>I use 30% height</block>
  <block>I use 50% height</block>
</block>
In this case all three nested block will remain on the same page and
will cause an overflow.

<block keep-together.within-column="1">
  <block>I use 30% height</block>
  <block>I use 30% height</block>
  <block>I use 50% height</block>
</block>
In this case, the 50% block is moved to the next page if the layout
engine doesn't find a better solution, for example by keeping the first
block on the previous page and keeping the latter two together. (all
assuming those nested blocks are unbreakable for example by carrying a
keep-together.within-column="always")

HTH

On 18.12.2008 11:12:39 Georg Datterl wrote:
> Hi Jeremias,
> 
> Did I understand that correctly? 
> 
> I have a block with keep-together="1" and taking 30% of a page. On a
> half filled page, the block would move to the next page if the
> following block takes between 21% and 70% of a page and would stay on the first
> page if the next block is less than 21% (all three blocks fit on the
> page) or the next block is more than 70% (both blocks would not fit on
> the page)?? 
> 
> 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: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
> Gesendet: Donnerstag, 18. Dezember 2008 09:31
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: Keep-together.within-page in FOP 0.95
> 
> You can fix this by not using a keep or by a more fine-grained use of keeps. Furthermore, I've implemented partial support for integer values on keeps in FOP Trunk. The strengths are not yet respected but contrary to "always", an integer value allows FOP to break a section if it would result in an overflow otherwise. HTH
> 
> On 17.12.2008 22:16:41 Rania Saghira wrote:
> > Hello,
> > 
> > I am using FOP 0.95 to convert my XML documents to PDF format. With 
> > previous versions of FOP i was able to use the keep-together="always"
> > to have my table content start on the next page if this does not fit 
> > in the current page. I read that the 
> > keep-together.within-page="always" should be equivalent to the 
> > keep-together="always" in FOP 0.25. This works in some cases, however 
> > if the row is larger than the page the content is overwriting the footer. How can i fix this?
> > Any help is really appreciated.
> > 
> > Best Regards,
> > Rania
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


AW: Keep-together.within-page in FOP 0.95

Posted by Georg Datterl <ge...@geneon.de>.
Hi Jeremias,

Did I understand that correctly? 

I have a block with keep-together="1" and taking 30% of a page. On a half filled page, the block would move to the next page if the following block takes between 21% and 70% of a page and would stay on the first page if the next block is less than 21% (all three blocks fit on the page) or the next block is more than 70% (both blocks would not fit on the page)?? 

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: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Gesendet: Donnerstag, 18. Dezember 2008 09:31
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Keep-together.within-page in FOP 0.95

You can fix this by not using a keep or by a more fine-grained use of keeps. Furthermore, I've implemented partial support for integer values on keeps in FOP Trunk. The strengths are not yet respected but contrary to "always", an integer value allows FOP to break a section if it would result in an overflow otherwise. HTH

On 17.12.2008 22:16:41 Rania Saghira wrote:
> Hello,
> 
> I am using FOP 0.95 to convert my XML documents to PDF format. With 
> previous versions of FOP i was able to use the keep-together="always"
> to have my table content start on the next page if this does not fit 
> in the current page. I read that the 
> keep-together.within-page="always" should be equivalent to the 
> keep-together="always" in FOP 0.25. This works in some cases, however 
> if the row is larger than the page the content is overwriting the footer. How can i fix this?
> Any help is really appreciated.
> 
> Best Regards,
> Rania




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Keep-together.within-page in FOP 0.95

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You can fix this by not using a keep or by a more fine-grained use of
keeps. Furthermore, I've implemented partial support for integer values
on keeps in FOP Trunk. The strengths are not yet respected but contrary
to "always", an integer value allows FOP to break a section if it would
result in an overflow otherwise. HTH

On 17.12.2008 22:16:41 Rania Saghira wrote:
> Hello,
> 
> I am using FOP 0.95 to convert my XML documents to PDF format. With
> previous versions of FOP i was able to use the keep-together="always"
> to have my table content start on the next page if this does not fit in the
> current page. I read that the keep-together.within-page="always" should
> be equivalent to the keep-together="always" in FOP 0.25. This works in
> some cases, however if the row is larger than the page the content is
> overwriting the footer. How can i fix this?
> Any help is really appreciated.
> 
> Best Regards,
> Rania




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org