diff options
author | Luis Bernardo <lbernardo@apache.org> | 2014-02-22 18:38:31 +0000 |
---|---|---|
committer | Luis Bernardo <lbernardo@apache.org> | 2014-02-22 18:38:31 +0000 |
commit | 6edf5c9f468b1a569065830500b3223434e2ef73 (patch) | |
tree | 95d15956e0305b61c8e17634f9e8c0f5fa8d97f5 /src/java | |
parent | c51d59011a3071707e69f6f06e7def09395f75bc (diff) | |
download | xmlgraphics-fop-6edf5c9f468b1a569065830500b3223434e2ef73.tar.gz xmlgraphics-fop-6edf5c9f468b1a569065830500b3223434e2ef73.zip |
FOP-2305: Poor resolution of PCL output in trunk vs. 1.1; fixed regression
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1570878 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/cli/CommandLineOptions.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java index ad8019a7d..b559e90b8 100644 --- a/src/java/org/apache/fop/cli/CommandLineOptions.java +++ b/src/java/org/apache/fop/cli/CommandLineOptions.java @@ -124,6 +124,8 @@ public class CommandLineOptions { private boolean conserveMemoryPolicy = false; /* true if a complex script features are enabled */ private boolean useComplexScriptFeatures = true; + /* set to true if -dpi used in command line */ + private boolean overrideTargetResolution = false; private FopFactory factory; private FOUserAgent foUserAgent; @@ -440,6 +442,7 @@ public class CommandLineOptions { "if you use '-dpi', you must specify a resolution (dots per inch)"); } else { this.targetResolution = Integer.parseInt(args[i + 1]); + this.overrideTargetResolution = true; return 1; } } @@ -1017,6 +1020,9 @@ public class CommandLineOptions { try { FopConfParser fopConfParser = new FopConfParser(userConfigFile, baseURI); fopFactoryBuilder = fopConfParser.getFopFactoryBuilder(); + if (this.overrideTargetResolution) { + fopFactoryBuilder.setTargetResolution(targetResolution); + } } catch (SAXException e) { throw new FOPException(e); } |