https://issues.apache.org/bugzilla/show_bug.cgi?id=46489





--- Comment #3 from Andreas L. Delmelle <adelme...@apache.org>  2009-03-22 
04:16:03 PST ---

Upon checking closer: the difference between the scenario with and without
tables is that, without tables the break-before has already triggered
addAreas() for the preceding parts. With tables, the forced break is included
in the complete list, but is preceded by another penalty which seems to confuse
things... The restartPoint is set to the point *between* the two penalties, so
when we restart the algorithm for the last page, it will encounter the forced
break too, as a first element, and produces two pages instead of only one.

I managed to hack the issue away locally by a adding a small check for this in
PageBreaker.doPhase3WithLastPage():

...
            newStartPos = pbp.getLeafPos();
            /* hack to avoid producing an extra page after the last */
            if (((KnuthElement)effectiveList.get(newStartPos)).isForcedBreak())
{
                newStartPos++;
            }
...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to