diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-10-18 16:06:31 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-10-18 16:06:31 +0000 |
commit | 20be3fe07bda82ab51d180744cba05ed707d8276 (patch) | |
tree | e7b9a68ba93e08aa7b77fd8b38a8cafbf7a69fda /src/java/org/apache/fop/area/PageViewport.java | |
parent | 4273340fedb25e6f3ea47f5750d3c5592fd4630f (diff) | |
download | xmlgraphics-fop-20be3fe07bda82ab51d180744cba05ed707d8276.tar.gz xmlgraphics-fop-20be3fe07bda82ab51d180744cba05ed707d8276.zip |
Fix for internal forward references in PDF output (basic-link with internal-destination):
Implemented by making out-of-order processing possible. The problem will still surface if supportsOutOfOrder() returns false.
PDF library now supports the addition of pages in non-consecutive order. This is a backwards-compatible change. The old behaviour and the old method signatures are still in place.
PageViewport now carries a page index which doesn't represent the page number but the overall index of the page within the current rendering run.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@326133 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/PageViewport.java')
-rw-r--r-- | src/java/org/apache/fop/area/PageViewport.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java index 046bd4698..2cced4a5f 100644 --- a/src/java/org/apache/fop/area/PageViewport.java +++ b/src/java/org/apache/fop/area/PageViewport.java @@ -48,6 +48,7 @@ public class PageViewport implements Resolvable, Cloneable { private Rectangle2D viewArea; private boolean clip = false; private String pageNumberString = null; + private int pageIndex = -1; //-1 = undetermined private SimplePageMaster spm = null; private boolean blank; @@ -138,6 +139,22 @@ public class PageViewport implements Resolvable, Cloneable { } /** + * Sets the page index of the page in this rendering run. + * @param index the page index (zero-based), -1 if it is undetermined + */ + public void setPageIndex(int index) { + this.pageIndex = index; + } + + /** + * @return the overall page index of the page in this rendering run (zero-based, + * -1 if it is undetermined). + */ + public int getPageIndex() { + return this.pageIndex; + } + + /** * Get the key for this page viewport. * This is used so that a serializable key can be used to * lookup the page or some other reference. |