From 45f21578efd0cfd5ad5ad19bf5b441fcfb944c7a Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 28 Jul 2005 10:08:20 +0000 Subject: [PATCH] Ported an important page setup instruction from the branch. GhostScript, for example, doesn't recognize the page size correctly, otherwise. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225739 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/ps/PSRenderer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/render/ps/PSRenderer.java b/src/java/org/apache/fop/render/ps/PSRenderer.java index 59a880fe8..4b549cf0c 100644 --- a/src/java/org/apache/fop/render/ps/PSRenderer.java +++ b/src/java/org/apache/fop/render/ps/PSRenderer.java @@ -313,7 +313,7 @@ public class PSRenderer extends PrintRenderer { //PostScript Header writeln(DSCConstants.PS_ADOBE_30); - gen.writeDSCComment(DSCConstants.CREATOR, new String[] { userAgent.getProducer() }); + gen.writeDSCComment(DSCConstants.CREATOR, new String[] {userAgent.getProducer()}); gen.writeDSCComment(DSCConstants.CREATION_DATE, new Object[] {new java.util.Date()}); gen.writeDSCComment(DSCConstants.LANGUAGE_LEVEL, new Integer(gen.getPSLevel())); gen.writeDSCComment(DSCConstants.PAGES, new Object[] {PSGenerator.ATEND}); @@ -396,6 +396,12 @@ public class PSRenderer extends PrintRenderer { gen.writeln(Math.round(pspageheight) + " 0 translate"); gen.writeln("90 rotate"); } + gen.writeln("<<"); + gen.writeln("/PageSize [" + + Math.round(pspagewidth) + " " + + Math.round(pspageheight) + "]"); + gen.writeln("/ImagingBBox null"); + gen.writeln(">> setpagedevice"); gen.writeln("0.001 0.001 scale"); concatMatrix(1, 0, 0, -1, 0, pageheight); -- 2.39.5