diff options
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java index 7faa0565e..8435ad093 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java @@ -383,6 +383,11 @@ public abstract class AbstractPageSequenceLayoutManager extends AbstractLayoutMa if (curPage != null) { finishPage(); } + + while (forcePageCount != Constants.EN_NO_FORCE && getCurrentPageNum() < getLastPageNumber()) { + curPage = makeNewPage(true); + finishPage(); + } } /** {@inheritDoc} */ @@ -390,4 +395,7 @@ public abstract class AbstractPageSequenceLayoutManager extends AbstractLayoutMa throw new IllegalStateException(); } + protected int getLastPageNumber() { + return currentPageNum; + } } |