Kaynağa Gözat

Changed meaning of '-v' option to 'verbose', which will print FOP's version and proceed. Added a '-version' option to simply print the version then exit, following Java practices.

Change made as per user demand, see thread here:
http://markmail.org/thread/e7juy7wvj7ujkltx


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@774724 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_0
Vincent Hennebert 15 yıl önce
ebeveyn
işleme
2e6df1438d

+ 9
- 6
src/java/org/apache/fop/cli/CommandLineOptions.java Dosyayı Görüntüle



import javax.swing.UIManager; import javax.swing.UIManager;


import org.xml.sax.SAXException;

import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.xml.sax.SAXException;


import org.apache.fop.Version; import org.apache.fop.Version;
import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOPException;
} else if (args[i].equals("-if")) { } else if (args[i].equals("-if")) {
i = i + parseIntermediateFormatOption(args, i); i = i + parseIntermediateFormatOption(args, i);
} else if (args[i].equals("-v")) { } else if (args[i].equals("-v")) {
/* Currently just print the version */
printVersion(); printVersion();
return false;
} else if (args[i].equals("-param")) { } else if (args[i].equals("-param")) {
if (i + 2 < args.length) { if (i + 2 < args.length) {
String name = args[++i]; String name = args[++i];
getPDFEncryptionParams().setAllowEditContent(false); getPDFEncryptionParams().setAllowEditContent(false);
} else if (args[i].equals("-noannotations")) { } else if (args[i].equals("-noannotations")) {
getPDFEncryptionParams().setAllowEditAnnotations(false); getPDFEncryptionParams().setAllowEditAnnotations(false);
} else if (args[i].equals("-version")) {
printVersion();
return false;
} else if (!isOption(args[i])) { } else if (!isOption(args[i])) {
i = i + parseUnknownOption(args, i); i = i + parseUnknownOption(args, i);
} else { } else {
"\nUSAGE\nfop [options] [-fo|-xml] infile [-xsl file] " "\nUSAGE\nfop [options] [-fo|-xml] infile [-xsl file] "
+ "[-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] <outfile>\n" + "[-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] <outfile>\n"
+ " [OPTIONS] \n" + " [OPTIONS] \n"
+ " -version print FOP version and exit\n"
+ " -d debug mode \n" + " -d debug mode \n"
+ " -x dump configuration settings \n" + " -x dump configuration settings \n"
+ " -q quiet mode \n" + " -q quiet mode \n"
+ " -r relaxed/less strict validation (where available)\n" + " -r relaxed/less strict validation (where available)\n"
+ " -dpi xxx target resolution in dots per inch (dpi) where xxx is a number\n" + " -dpi xxx target resolution in dots per inch (dpi) where xxx is a number\n"
+ " -s for area tree XML, down to block areas only\n" + " -s for area tree XML, down to block areas only\n"
+ " -v to show FOP version being used\n\n"
+ " -v run in verbose mode (currently simply print FOP version and continue)\n\n"
+ " -o [password] PDF file will be encrypted with option owner password\n" + " -o [password] PDF file will be encrypted with option owner password\n"
+ " -u [password] PDF file will be encrypted with option user password\n" + " -u [password] PDF file will be encrypted with option user password\n"
+ " -noprint PDF file will be encrypted without printing permission\n" + " -noprint PDF file will be encrypted without printing permission\n"
+ " -noannotations PDF file will be encrypted without edit annotation permission\n" + " -noannotations PDF file will be encrypted without edit annotation permission\n"
+ " -pdfprofile prof PDF file will be generated with the specified profile\n" + " -pdfprofile prof PDF file will be generated with the specified profile\n"
+ " (Examples for prof: PDF/A-1b or PDF/X-3:2003)\n\n" + " (Examples for prof: PDF/A-1b or PDF/X-3:2003)\n\n"
+ " -conserve Enable memory-conservation policy (trades memory-consumption for disk I/O)"
+ " (Note: currently only influences whether the area tree is serialized.)"
+ " -conserve Enable memory-conservation policy (trades memory-consumption for disk I/O)\n"
+ " (Note: currently only influences whether the area tree is serialized.)\n\n"
+ " [INPUT] \n" + " [INPUT] \n"
+ " infile xsl:fo input file (the same as the next) \n" + " infile xsl:fo input file (the same as the next) \n"
+ " (use '-' for infile to pipe input from stdin)\n" + " (use '-' for infile to pipe input from stdin)\n"

+ 4
- 0
status.xml Dosyayı Görüntüle

documents. Example: the fix of marks layering will be such a case when it's done. documents. Example: the fix of marks layering will be such a case when it's done.
--> -->
<release version="FOP Trunk" date="TBD"> <release version="FOP Trunk" date="TBD">
<action context="Code" dev="VH" type="fix">
Changed meaning of ‘-v’ option to ‘verbose’, which will print FOP’s version and proceed.
Added a ‘-version’ option to simply print the version then exit, following Java practices.
</action>
<action context="Layout" dev="VH" type="fix" fixes-bug="47101"> <action context="Layout" dev="VH" type="fix" fixes-bug="47101">
Bugfix: The cells of a table inside a marker were duplicated at every marker retrieval. Bugfix: The cells of a table inside a marker were duplicated at every marker retrieval.
</action> </action>

Loading…
İptal
Kaydet