From 9f0c982fcc1582c826739025fad51fff270b6115 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 24 Jul 2006 08:50:48 +0000 Subject: [PATCH] Bugzilla #38714 and #40048: Fixed setting of page margin like it was done in the print renderer. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@424966 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/awt/AWTRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/render/awt/AWTRenderer.java b/src/java/org/apache/fop/render/awt/AWTRenderer.java index 6766d4809..802be2409 100644 --- a/src/java/org/apache/fop/render/awt/AWTRenderer.java +++ b/src/java/org/apache/fop/render/awt/AWTRenderer.java @@ -169,7 +169,6 @@ public class AWTRenderer extends Java2DRenderer implements Pageable { PageFormat pageFormat = new PageFormat(); Paper paper = new Paper(); - pageFormat.setPaper(paper); Rectangle2D dim = getPageViewport(pageIndex).getViewArea(); double width = dim.getWidth(); @@ -186,6 +185,7 @@ public class AWTRenderer extends Java2DRenderer implements Pageable { paper.setSize(width / 1000d, height / 1000d); pageFormat.setOrientation(PageFormat.PORTRAIT); } + pageFormat.setPaper(paper); return pageFormat; } catch (FOPException fopEx) { throw new IndexOutOfBoundsException(fopEx.getMessage()); -- 2.39.5