xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bowditch <bowditch_ch...@hotmail.com>
Subject Re: keep-with-previous and page break
Date Tue, 06 Jul 2010 11:14:24 GMT
Dominik Stadler wrote:
> Hi,

Hi Dominik,

> 
>  
> 
> I am creating automated PDF documents using FOP 0.95. I tried to use 
> keep-with-previous=“always“ to keep related content near each other when 
> rendering multi-page documents.
> 
>  
> 
> FOP renders as much related content as possible, but does not overflow 
> the rest to the next page, but simply ignores it, so if I have 10 
> images, where only the first 3 fit on the page, the other 7 are simply 
> not visible in the PDF.
> 
>  
> 
> Is this the intended behaviour? Is there another way to tell FOP that 
> the relation is there, but it still should do page breaks if the page is 
> filled?

using keep-*="always" does prevent page breaking as Georg suggested. Why 
can't you just use keep-together on the image and its text description? 
Only if the related content is bigger than a single page do you run into 
problems. In your example of 10 images, if you place a 
keep-together="always" on the block containing the image and the image 
description then those items should be kept together and as long as they 
fit into 1 page you should need the integer keeps from FOP trunk. In 
your example of 10 images you would use 10 keep-together's.

There are some known issues with keep-with-previous especially when used 
in conjunction with tables. So I would try to avoid keep-with-previous 
and use keep-together or keep-with-next instead.

> 
>  
> 
> As I do not know how much content fits on a page, I would not like to 
> start setting/unsetting keep-with-previous on my own, but would expect 
> the renderer to do page breaks if keeping on one page is not possible.
> 
>  
> 
> The XSL-FO looks roughly like this, all elements use 
> “keep-with-previous” to not have page-breaks between the heading and the 
> images.

<snip/>

Chris

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


Mime
View raw message