You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by lb...@apache.org on 2014/02/22 19:38:31 UTC
svn commit: r1570878 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
Author: lbernardo
Date: Sat Feb 22 18:38:31 2014
New Revision: 1570878
URL: http://svn.apache.org/r1570878
Log:
FOP-2305: Poor resolution of PCL output in trunk vs. 1.1; fixed regression
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=1570878&r1=1570877&r2=1570878&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java Sat Feb 22 18:38:31 2014
@@ -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);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org