Hi,

Ankur Narain Bhardwaj ,Gurgaon wrote:
> Hi
> 
> Attached here is an XSL-FO that causes the FOP 0.94 to go into an infinite 
> loop. This is causing serious problems in our application. I narrowed down 
> the problem to an "<fo:block>Â </fo:block> " element placed within the 
> footnote. This block element contains the character Â. This character may be 
> the cause for the FOP 0.94 to go into an infinite loop depending on certain 
> data in the XSL-FO. When "<fo:block>Â </fo:block> is removed from the 
> footnote the PDF will generate. However I am baffled as to why this FOP 0.94 
> goes into an infinite loop. Whatever the issue, FOP 0.94 shouldn't go into an 
> infinite loop. It should throw an exception if it has problems with the 
> XSL-FO. It appears to be a serious issue or Bug with FOP 0.94. Can some 
> apache FOP developer confirm whether this is a problem or not? This is urgent.

Please download the sources of FOP 0.94 and apply the attached patch 
from the root of the project. That should solve your particular problem 
although there are other problems related to footnotes. Please don’t use 
FOP Trunk as it is unstable ATM.

The problem is that there is not enough room for the footnote on the 
second page, so it has to be deferred to the third page, and without the 
attached patch FOP makes a computation error when trying to split the 
footnote (which can’t be split in this case, anyway), entering an 
infinite loop. This issue is not related to FOP 0.94 and probably exists 
since 0.90 alpha 1...

That said, the fact that the footnote will be deferred to the next page 
will lead to a visually unpleasant result that you will probably want to 
avoid, by somehow leaving place to the footnote.

HTH,
Vincent
Index: src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java	(revision 562946)
+++ src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java	(working copy)
@@ -550,6 +550,7 @@
                         splitLength += element.getW();
                     } else {
                         // element is a penalty
+                        bPrevIsBox = false;
                         if (element.getP() < KnuthElement.INFINITE) {
                             // end of the sub-sequence
                             index = noteListIterator.previousIndex();

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

Reply via email to