Hi Dominik,

Basically, you tell FOP not to insert breaks and FOP does exactly that. It 
always keeps your blocks with their predecessors. If you want your content to 
flow to the next page, remove the keep-with-previous. If you want breaks only 
between special images, remove the keep there.

If you want as many images on one page as possible, but only up to a full page 
height, then get rid of your keep-with-previous, put all your content into one 
block, mark this block with keep-together.within-page="5" and get FOP trunk, 
where integer keeps are already implemented (a little bit).

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<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    
www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                            
www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:                 
www.willmycc.de<http://www.willmycc.de>

Von: Dominik Stadler [mailto:dominik.stad...@dynatrace.com]
Gesendet: Montag, 5. Juli 2010 14:30
An: fop-users@xmlgraphics.apache.org
Betreff: keep-with-previous and page break

Hi,

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?

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.

Reply via email to