aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/cli
diff options
context:
space:
mode:
authorManuel Mall <manuel@apache.org>2005-12-17 05:26:36 +0000
committerManuel Mall <manuel@apache.org>2005-12-17 05:26:36 +0000
commitf3872545227afbab91aac6b68e50686d07255216 (patch)
treef9c9e3337fa1090ea243ada3a246efdab31570f3 /src/java/org/apache/fop/cli
parentcd600b952b6326195b1670e6a17af75d51f46b57 (diff)
downloadxmlgraphics-fop-f3872545227afbab91aac6b68e50686d07255216.tar.gz
xmlgraphics-fop-f3872545227afbab91aac6b68e50686d07255216.zip
Another workaround/hack to deal with non breaking spaces. Also some minor adjustments to support the planned AFP renderer
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@357298 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/cli')
-rw-r--r--src/java/org/apache/fop/cli/CommandLineOptions.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java
index b7553a6ad..c1c069b39 100644
--- a/src/java/org/apache/fop/cli/CommandLineOptions.java
+++ b/src/java/org/apache/fop/cli/CommandLineOptions.java
@@ -226,6 +226,8 @@ public class CommandLineOptions implements Constants {
i = i + parseTextOutputOption(args, i);
} else if (args[i].equals("-svg")) {
i = i + parseSVGOutputOption(args, i);
+ } else if (args[i].equals("-afp")) {
+ i = i + parseAFPOutputOption(args, i);
} else if (args[i].equals("-foout")) {
i = i + parseFOOutputOption(args, i);
} else if (args[i].equals("-out")) {
@@ -440,6 +442,17 @@ public class CommandLineOptions implements Constants {
}
}
+ private int parseAFPOutputOption(String[] args, int i) throws FOPException {
+ setOutputMode(MimeConstants.MIME_AFP);
+ if ((i + 1 == args.length)
+ || (args[i + 1].charAt(0) == '-')) {
+ throw new FOPException("you must specify the AFP output file");
+ } else {
+ outfile = new File(args[i + 1]);
+ return 1;
+ }
+ }
+
private int parseFOOutputOption(String[] args, int i) throws FOPException {
setOutputMode(MimeConstants.MIME_XSL_FO);
if ((i + 1 == args.length)