I didn’t think keep-with-previous would have more “power” than the end of the page. If so, it means that I need to stop using it for now or at least implement a workaround into my generation logic as I don’t want to use trunk for (soon to be) production code. I will revisit this later when a new release-version of FOP is available.
Thanks for the quick reply… Dominik.
Georg Datterl [mailto:firstname.lastname@example.org]
Sent: Montag, 05. Juli 2010 14:47
Subject: AW: keep-with-previous and page break
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).
------ Kontakt ------
Geneon media solutions gmbh
Gutenstetter Straße 8a
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert
Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
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
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.