I’ve run out of the time I can allocate to this issue I’m afraid. I have
a fix but it needs to be cleaned up and tested.

The best way to avoid the problem is to fix all the overflow warnings
that you are getting. You probably want to fix them anyway since it may
lead to a better output.

If constraints prevent you from fixing them all, then you can try the
attached patch against the latest trunk. It should be fairly safe in the
sense that it doesn’t modify the layout engine’s behaviour, only the
overflow reporting mechanism. That said, it’s untested and unsupported
:-)

In the future, one thing that would be of great help when you submit FO
files would be to replace all the custom fonts with the default ones:
serif, sans-serif, monospace. That will avoid a lot of noise in the
warnings, but most of all allow us to reproduce the exact same layout as
you have.


Thanks,
Vincent


On 19/07/12 22:09, Rob Sargent wrote:
> A prince you are!
> 
> I do have many of those messages, some are very regular (same 7200pt overflow)
> and must be from a repeated element.  Others are more varied are hence more
> likely to be in the flow perhaps? Since as you point out they are not page
> numbers, is there anything I can do, e.g. command line params, debug levels to
> help me pin-point the errant content?
> 
> Counting this one as under control, I still have one more issue for which I
> think there is an page break problem.  Still working on a small repeatable
> offender.
> 
> Cheers,
> 
> rjs
> 
> 
> 
> 
> On 07/19/2012 02:26 PM, Vincent Hennebert wrote:
>> Hi Rob,
>>
>> Thanks for your efforts to reduce the size of the FO file, this is
>> really appreciated.
>>
>> I believe I found the problem, but need to investigate a bit more. In
>> the meantime, try to modify the content so that it doesn’t overflow the
>> page. Watch for messages saying ‘Content overflows the viewport of the
>> fo:region-body on page n’. Except that ‘n’ is not the page number... but
>> the column number!
>>
>> If you can avoid page overflows, you should avoid triggering the issue
>> and get appropriate page numbers.
>>
>> HTH,
>> Vincent
>>
>>
>> On 19/07/12 20:33, Rob Sargent wrote:
>>> I have whittled the fo down further (shorter-fop.xml, now 35%) of original,
>>> but this is as small as I can go to reproduce the exact 3-page stutter.  I 
>>> can
>>> remover one more page and get a single stutter (shortest-fop.xml)
>>>
>>> I pray this will be enough.
>>>
>>> Thanks a bunch.
>>>
>>>
>>> On 07/19/2012 12:51 PM, Rob Sargent wrote:
>>>> I truly regret the large fo;  I know it hampers things at debug time.  I 
>>>> had
>>>> to find a particular starting point such that the content was still aligned
>>>> with the original placements.  I'll try to trim more pages from after the
>>>> page numbering problem.
>>>>
>>>> rjs
>>>>
>>>>
>>>> On 07/19/2012 01:31 AM, Pascal Sancho wrote:
>>>>> Hi,
>>>>>
>>>>> To be efficient, a short fo helping to reproduce the issue should be
>>>>> attached to the bug entry, so opening a bug rather than ask on this
>>>>> list doesn't help anymore if the material remains the same.
>>>>> I (or somebody else) have to look closer into the fo you attached
>>>>> here,  then perhaps I (or somebody else) will, or will not, find a bug
>>>>> causing this issue. Since the use case is quite big, that will take
>>>>> some extra time :/
>>>>>
>>>>> 2012/7/18 Rob Sargent <rsarg...@xmission.com>:
>>>>>> My apologies, but I've been unable to shrink this to a small test.  I'm
>>>>>> forced to send a rather large fo, but that's my level of desperation. Or
>>>>>> should I open a bug report?
>>>>>>
>>>>>> rjs
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 07/12/2012 09:20 AM, Rob Sargent wrote:
>>>>>>
>>>>>> I will do my best, but I see nothing in the generated fo that strikes me 
>>>>>> as
>>>>>> suspicious.
>>>>>>
>>>>>> See other post on not getting identical output from commandline, which is
>>>>>> hampering generating reliable tests.
>>>>>>
>>>>>> Anecdote:  prior to the 3 pages of stutter there are three pages 
>>>>>> (correctly
>>>>>> numbered) which have no text (entirely region-before), so this may also 
>>>>>> be
>>>>>> related to issue
>>>>>>
>>>>>> If you're anxious for an example, I can certainly post the 40-page 
>>>>>> chapter
>>>>>> fo but the last one made Vincent um, er, grumpy :).
>>>>>>
>>>>>> rjs
>>>>>>
>>>>>> On 07/12/2012 02:35 AM, Pascal Sancho wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> One needs to see what there is in the XSL-FO (XML + XSLT transfo
>>>>>> result) fed to FOP.
>>>>>> Can you have a look on it, or provide a minimal version of it, so one
>>>>>> can reproduce the described issue?
>>>>>>
>>>>>> 2012/7/11 Rob Sargent <rsarg...@xmission.com>:
>>>>>>
>>>>>> In the middle of my document that page numbering goes 19, 20, 
>>>>>> 24,24,24,24,
>>>>>> 25.  Further more the table-of-contents generated by
>>>>>> fo:page-number-citation
>>>>>> uses the bogus 24s for elements on actual page 21,23.
>>>>>>
>>>>>> Anyone seen this before?  Hints on rooting out the cause?
>>>>>>
>>>>>> FOP-1.0
>>>>>>
>>>>>> rjs
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> 

Index: src/java/org/apache/fop/layoutmgr/PageBreaker.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/PageBreaker.java	(revision 1363369)
+++ src/java/org/apache/fop/layoutmgr/PageBreaker.java	(working copy)
@@ -95,8 +95,8 @@
         return new PageBreakingLayoutListener() {
 
             public void notifyOverflow(int part, int amount, FObj obj) {
-                Page p = pageProvider.getPage(
-                            false, part, PageProvider.RELTO_CURRENT_ELEMENT_LIST);
+                Page p = pageProvider.getPageFromColumnIndex(part);
+//                Page p = pageProvider.getPage(false, part, PageProvider.RELTO_CURRENT_ELEMENT_LIST);
                 RegionBody body = (RegionBody)p.getSimplePageMaster().getRegion(
                         Region.FO_REGION_BODY);
                 BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
Index: src/java/org/apache/fop/layoutmgr/PageProvider.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/PageProvider.java	(revision 1363369)
+++ src/java/org/apache/fop/layoutmgr/PageProvider.java	(working copy)
@@ -339,4 +339,18 @@
         return page;
     }
 
+    Page getPageFromColumnIndex(int columnIndex) {
+        int columnCount = 0;
+        int colIndex = startColumnOfCurrentElementList + columnIndex;
+        int pageIndex = -1;
+        Page page;
+        do {
+            colIndex -= columnCount;
+            pageIndex++;
+            page = getPage(false, pageIndex, RELTO_CURRENT_ELEMENT_LIST);
+            columnCount = page.getPageViewport().getCurrentSpan().getColumnCount();
+        } while (colIndex >= columnCount);
+        return page;
+    }
+
 }

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

Reply via email to