Hi Paul,

This kind of problem, like many others involving page breaking
decisions, will be addressed in the rewritten version of FOP which some
of us (most Keiron Liddle) are currently working on. I know it's
frustrating not to see any forward evolution during this time, but we
felt FOP had gotton to a point where it was too difficult to handle this
kind of problem. The timescale for the redesigned FOP being able to
handle that correctly is a minimum of several months. So unfortunately,
I think you have two choices:
1. use your workaround,
2. if you're feeling brave, look at the FOP CVS branch which is the
"bug-fix" branch, which should still be in working order and try to work
out a way to make the spanning rows "breakable". You may be able to get
something that works for you. In org/apache/fop/fo/flow/TableRow.java,
in the layout() method, you'll see some code like this:

        if ((status = cell.layout(areaContainer)).isIncomplete()) {
           if ((keepTogether.getType() == KeepValue.KEEP_WITH_ALWAYS)
                || (status.getCode() == Status.AREA_FULL_NONE)
                || rowSpan > 1) {

This means: if the current cell doesn't completely fit on the current
page, and if the row is suposed to always be "kept-together" or nothing
at all fit in the cell or we are in a row-spanning cell, we give up
trying to layout this row and try again on the next page.
Obviously, if this is the first row on the page already, we should just
"break" it anyway and put the rest of the cell on the next page. Fop
knows how to do this for non-spanning cells (well, actually, it doesn't
check to see if this is the first row on the page), but I was being lazy
when I wrote the spanning code and didn't do this. If you just get rid
of the (rowSpan>1) condition, that probably won't completely solve it,
but you could start from there and then try to fix what didn't work.

Or perhaps if you sent me some good chocolate, you could convince me to
divert my attention from the redesign and try to figure out a fix for
this. :-)))
Seriously, if it's a blocking problem, I could be convinced. I know
you're not the only one inconvenienced by this.
Or perhaps one of the other FOP committers could be convinced to look
into this. Takers anyone?

Best regards,
Karen Lease

"Smith, Paul" wrote:
> 
> In Fop 0.20.2 if a table cell spans more rows than fit on a page it loops
> infinitely, presumably trying to find a page big enough to place the cell
> on. Looking through the archives of this list I found that I am not the only
> one who has been affected by this. David S. Dixon reported it as a problem
> on 21/9/01. At that time Karen Lease said that she was looking at this
> problem. So what is this current situation? Is it a priority to fix this
> bug? If so what sort of timescale are we looking at?
> 
> I can write a work around (although it will be messy) in my application but
> it would be nice to have a proper fix in FOP. I will take a look at the FOP
> code but as I am new to FOP any pointers on where to look and ideas of how
> this problem maybe solved would be much appreciated.
> 
> I have included the original thread below. Taken from
> http://marc.theaimsgroup.com/?l=fop-dev&m=100117495412259&w=2
> 
> ---
> Paul Smith
> 
> Karen,
> 
> That's it -- thre spanning column has a long list-block that goes over to
> the next
> page.  Okay, I can workaround by putting tables within tables.  Thanks.
> 
> -dd
> 
> Karen Lease wrote:
> 
> > David,
> >
> > I don't think it was in 0.19.0, which is consistent with the error
> > message.
> > The reason for the infinite loop may well be that some group of rows
> > which are held together by spans is too big to fit on the page. This is
> > a known bug, and I'm not currently working on it, as it's not that easy
> > to do. Like many difficult layout issues, we hope to attack this in the
> > "redesign".
> > However, just to make sure that there isn't some other wierd reason for
> > this problem, I'd be happy to look at your .fo file.
> >
> > Regards,
> > Karen
> >
> > "David S. Dixon" wrote:
> > >
> > > Karen,
> > >
> > > Was number-rows-spanned support in 0.19.0?  I have an .fo file that
> turns into a
> > > .pdf file under 0.19.0 but complains of
> > >
> > > WARNING: Number of cell columns under table-row not equal to number of
> > > table-columns
> > >
> > > for the two rows corresponding to the spanned rows.  Under 0.20.1, fop
> goes into
> > > an infinite loop on this file.
> > >
> > > -dd
> > >
> > > Karen Lease wrote:
> > >
> > > > Hi Amit,
> > > >
> > > > The number-rows-spanned property is now implemented in FOP, but it
> > > > wasn't yet in 0.18.1. If you want to use it, you should download the
> > > > latest version of FOP from the website - that's 0.20.1.
> > > >
> > > > Regards,
> > > > Karen
> > > >
> > > > [EMAIL PROTECTED] wrote:
> > > > >
> > > > > I'm not sure if this is the right place to ask such a question... if
> not, I
> > > > > would appreciate some information on where to find a solution to
> this
> > > > > problem :-
> > > > >
> > > > > I've been trying to use the "number-rows-spanned" property to
> generate
> > > > > tables in my PDF file using FOP 0.18.1. However, I keep getting
> errors - is
> > > > > the "number-rows-spanned" property not implemented in FOP yet?
> > > > >
> > > > > Thanks for your help
> > > > > amit
> 
> *******************************************************************
> DISCLAIMER: The information contained in this email
>  is confidential and is intended solely for the use of the
>  named addressee.  Access, copying or re-use of the
>  information in it by any other person is not authorised.
> 
> ********************************************************************
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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

Reply via email to