You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Dirk Bromberg <di...@familie-bromberg.de> on 2007/03/27 17:25:25 UTC

fop pagebreak problems / errors

Hi fops,


I've got some strange behaviour of the fop-mechanisms when I try to 
force a page break from within a table. Basically the page breaks seem 
to have no effect, as long as the height of an enclosing row is not 
reached. I'm using fop-0.93.

 

I attached a small set of files to illustrate that. In the file 
not_paging.fo, the page-break is the only block element within a row 
with enforced height of 10. The page break is ignored here. Changing to 
break-before doesn't change that.

 

After inserting a bit of text (as in is_paging.fo), the height of the 
cell is taller than indicated in the fo, and surprisingly the page break 
*is* included. Can you please check, if this is an intended behaviour? 
If so: How can I enforce a page break then without having to remove the 
height constraints?


Thanks

Dirk

 

 

PS - On a different note: break-after crashes in the fo given in 
crash.fo with an illegal state exception (this surely is a bug, isn't it?):

 

java.lang.IllegalStateException: Invalid break class: -1

        at 
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)

        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)

        at org.apache.fop.cli.Main.startFOP(Main.java:160)

        at org.apache.fop.cli.Main.main(Main.java:191)

 

When I change to break-before, it doesn't crash.


Re: fop pagebreak problems / errors

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 28, 2007, at 10:02, Vincent Hennebert wrote:

Hi Vincent,

> <snip />
> Anyway, this doesn't look desirable to me, and your question seems to
> confirm my feeling ;-) Any other opinions on this?

FWIW:
I've just tried the most recent sample, and now indeed I see the  
problem.
Even funnier is that, if you add a bit of text after the block with  
the forced break, that text simply gets swallowed. It disappears with  
the page-break.

Definitely a nasty bug, this one. :/

The other one (crash w/ IllegalStateException) could be a side-effect  
of the above. Last night, I did notice that a value of -1 for  
breakClass would mean that the 5-argument constructor of KnuthPenalty  
was used to create the penalty, but setBreakClass() hasn't been  
called afterwards. Normally, this latter method is called only in  
TableContentLayoutManager (line 215 IIRC), but there it only seems to  
pick up the break-before property...


Cheers,


Andreas

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


Re: fop pagebreak problems / errors

Posted by Thomas Gelzhaeuser <th...@gelzhaeuser.de>.
On 3/28/07, Vincent Hennebert <vi...@anyware-tech.com> wrote:
>
> >> PS - On a different note: break-after crashes in the fo given in
> >> crash.fo with an illegal state exception (this surely is a bug, isn't
> >> it?):
> >
> > Yep, this is definitely a bug! Thanks for mentioning.
>
> Would you mind creating a Bugzilla entry for this bug, attaching the
> sample fo file? So that we can keep track of it. Thanks!
> http://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop


Just issued it: http://issues.apache.org/bugzilla/show_bug.cgi?id=41965

Indeed. Any forced break occuring before the minimum row height is
> reached is removed. I vaguely remember a post on fop-dev explaining the
> reason of such a behavior, but I can't retrieve it.
>
> Anyway, this doesn't look desirable to me, and your question seems to
> confirm my feeling ;-) Any other opinions on this?


I found it very irritating and it did cost me half a day to find out why fop
behaved the way it did. Originally none of my page breaks worked, as I am
using nested tables to do the layouting.

Additionally, it is quite unpredictable then, if a page break is having an
effect, as it depends on how much text is added before the break. Which is
in dynamically created fops not very clear,

Good news is that I'm currently working on this part of the code, so the
> issue might be fixed soon. Stay tuned.


That's good news! Thanks!

Thomas.

Re: fop pagebreak problems / errors

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi,

Andreas L Delmelle a écrit :
> On Mar 27, 2007, at 17:25, Dirk Bromberg wrote:
> 
> Hi Dirk,
> 
> Considering the following:
> 
>> PS - On a different note: break-after crashes in the fo given in
>> crash.fo with an illegal state exception (this surely is a bug, isn't
>> it?):
> 
> Yep, this is definitely a bug! Thanks for mentioning.

Would you mind creating a Bugzilla entry for this bug, attaching the
sample fo file? So that we can keep track of it. Thanks!
http://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop


> Interesting to note that the crash only seems to happen if the
> break-after is specified on the last cell in the table.
> 
> As to your other remarks:
> 
>> I've got some strange behaviour of the fop-mechanisms when I try to
>> force a page break from within a table. Basically the page breaks seem
>> to have no effect, as long as the height of an enclosing row is not
>> reached. I'm using fop-0.93.

Indeed. Any forced break occuring before the minimum row height is
reached is removed. I vaguely remember a post on fop-dev explaining the
reason of such a behavior, but I can't retrieve it.

Anyway, this doesn't look desirable to me, and your question seems to
confirm my feeling ;-) Any other opinions on this?

Good news is that I'm currently working on this part of the code, so the
issue might be fixed soon. Stay tuned.


Vincent

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


Re: fop pagebreak problems / errors

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 27, 2007, at 17:25, Dirk Bromberg wrote:

Hi Dirk,

Considering the following:

> PS - On a different note: break-after crashes in the fo given in  
> crash.fo with an illegal state exception (this surely is a bug,  
> isn't it?):

Yep, this is definitely a bug! Thanks for mentioning.

Interesting to note that the crash only seems to happen if the break- 
after is specified on the last cell in the table.

As to your other remarks:

> I've got some strange behaviour of the fop-mechanisms when I try to  
> force a page break from within a table. Basically the page breaks  
> seem to have no effect, as long as the height of an enclosing row  
> is not reached. I'm using fop-0.93.
>
>
> I attached a small set of files to illustrate that. In the file  
> not_paging.fo, the page-break is the only block element within a  
> row with enforced height of 10. The page break is ignored here.  
> Changing to break-before doesn't change that.

Either some of the attachments weren't pasted as intended, or  
something has changed in FOP Trunk, but playing with your examples,  
even when I remove the height property or the fo:block with the text,  
the break on the empty fo:block seems to be processed correctly... ?

Am I missing something?


Cheers,

Andreas

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