aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
diff options
context:
space:
mode:
authorLuis Bernardo <lbernardo@apache.org>2013-10-13 23:31:46 +0000
committerLuis Bernardo <lbernardo@apache.org>2013-10-13 23:31:46 +0000
commit72d4de19de6175a92213e3c05e11b71dd1ed2714 (patch)
tree3700acfa07b91cce0ae5a3cd4f03cff702eeadae /src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
parentc183dd2ece0d12fb156be6d9f5134a20d144ce73 (diff)
downloadxmlgraphics-fop-72d4de19de6175a92213e3c05e11b71dd1ed2714.tar.gz
xmlgraphics-fop-72d4de19de6175a92213e3c05e11b71dd1ed2714.zip
FOP-1872: External document is clipped when rotated; patch submitted by Thanasis Giannimaras.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1531769 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
index 7cbe33f26..aae5a6b30 100644
--- a/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
@@ -242,8 +242,14 @@ public class ExternalDocumentLayoutManager extends AbstractPageSequenceLayoutMan
pv.setPage(pageArea);
RegionViewport rv = new RegionViewport(referenceRect);
- rv.setIPD(referenceRect.width);
- rv.setBPD(referenceRect.height);
+
+ if (pageSeq.getReferenceOrientation() % 180 == 0) {
+ rv.setIPD(referenceRect.width);
+ rv.setBPD(referenceRect.height);
+ } else {
+ rv.setIPD(referenceRect.height);
+ rv.setBPD(referenceRect.width);
+ }
rv.setClip(true);
BodyRegion body = new BodyRegion(Constants.FO_REGION_BODY,