From f3872545227afbab91aac6b68e50686d07255216 Mon Sep 17 00:00:00 2001 From: Manuel Mall Date: Sat, 17 Dec 2005 05:26:36 +0000 Subject: 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 --- src/java/org/apache/fop/cli/CommandLineOptions.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/java/org/apache/fop/cli') 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) -- cgit v1.2.3