The keep-with stuff is only implemented for tables. And I'm not sure
that all of it really is. Try wrapping your block in simple tables and
specify the keep-with attributes on the table-row. I've sucessfully used
keep-with-previous="always" and keep-with-next="always" on table-row.
Good luck.

Hi,

If you're past page 1, I think the "keeps" are turned off.

There was a big problem with running into an infinite loop when
the total layout area for all the "keeps" intended for one page
simply did not fit on one page. I'm not an expert, but I believe
that Fop would try to fit the "too big" stuff on the next page, fail,
try again with the following page, fail, ...

The quick fix for this was to turn off the "keeps" after the first
page break. That burned me because I had to bunch table rows
together in groups of 5 rows followed by one blank line, over
and over on all pages. So, for the code on site here, I undid
that fix.

If you are positive that your stuff will fit in a single page
(after accounting for region-before, region-after, margins,
etc.), you too can undo it. Look at the code around lines 204
and 220 of  src/org/apache/fop/fo/flow/TableBody.java.
Comment out the rowSpanMgr.setIgnoreKeeps(true), and
make sure you remember that you did that. I have no idea
what else that might affect, but for keeping my reports
bunched in some number of rows with blanks between
bunches, it works.

BTW, I know I'm not an expert because I spent a couple days
last February looking for a way to fix the infinite loop problem
without turning off keeps. Didn't find it and still had to produce
reports, so I moved on.

 HTH,

 Joe


> I have template where I have fo:block, inside there are 4 tables and
other blocks.
> And I need to keep all this on the same page.
> Af cource I have read documentation and there are some mentions about
> "keep-together.within-page"
> I did:
> <fo:block keep-with-next.within-column="always"
keep-together.within-column="always">
> Anyway block is braking, I did play around and didn't found any solution
to do it.
>
> Please tell me if there are some bug or I am doing something wrong.
> Thank you for your time.

Cheers,
Jeremias Märki

mailto:[EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to