XMLGRAPHICS-FOP(1) | http://xmlgraphics.apache. | XMLGRAPHICS-FOP(1) |
NAME¶
xmlgraphics-fop - Formatter for Printing XSLT Processed XML Files
SYNOPSIS¶
Classname: org.apache.fop.cli.Main
xmlgraphics-fop [-fo | -xml] infile [-xsl file] [-awt | -pdf | -mif | -rtf | -tiff | -png | -pcl | -ps | -txt | -at [mime] | -print] outfile
OPTIONS¶
The following options in alphabetical order are available:
-a
-afp OUTFILE
-at [mime] OUTFILE
-atin INFILE
-awt
-c cfg.xml
-catalog
-conserve
-d
-dpi XXX
-fo INFILE
-foout OUTFILE
-if [mime] OUTFILE
-ifin INFILE
-imagein INFILE
infile
-l LANG
-noannotations
-nocopy
-noedit
-noprint
-o PASSWORD
-out mime OUTFILE
outfile
-param NAME VALUE
-pcl OUTFILE
-pdf OUTFILE
-pdfa1b OUTFILE
-pdfprofile PROF
-png OUTFILE
-ps OUTFILE
-q
-r
-rtf OUTFILE
-s
-svg OUTFILE
-tiff OUTFILE
-txt OUTFILE
-u PASSWORD
-v
-version
-x
-xml INFILE
-xsl STYLESHEET
FOP CONFIGURATION FILE¶
This is a small overview. More details can be found in http://xmlgraphics.apache.org/fop/trunk/configuration.html#renderers.
Example 1. Excerpt FOP Configuration File
<fop version="1.0">
<!-- Strict user configuration -->
<strict-configuration>true</strict-configuration>
<!-- Strict FO validation -->
<strict-validation>true</strict-validation>
<!-- Base URL for resolving relative URLs -->
<base>./</base>
<!-- Font Base URL for resolving relative font URLs -->
<font-base>./</font-base>
<!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
<source-resolution>72</source-resolution>
<!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
<target-resolution>72</target-resolution>
<!-- default page-height and page-width, in case
value is specified as auto -->
<default-page-settings height="11in" width="8.26in"/>
<!-- Use file name nl_Bel instead of the default nl_BE -->
<hyphenation-pattern lang="nl" country="BE">nl_Bel</hyphenation-pattern>
<!-- etc. etc..... --> </fop>
Table 1. Summary of the General Configuration Options
Element | Data Type | Description | Default Value |
base | URL or directory | Specifies the base URL based on which relative URL will be resolved | current directory |
font-base | URL or directory | Specifies the base URL based on which relative font URLs will be resolved | base URL/directory |
hyphenation-base | URL or directory | Specifies the base URL based on which relative URLs to hyphenation pattern files will be resolved. If not specified, support for user-supplied hyphenation patterns remains disabled | disabled |
Relative URIs for the above three properties are evaluated relative to the base URI of the configuration file. If the configuration is provided programmatically, the base URI can be set with FopFactory.setUserConfigBaseURI; default is the current working directory. | |||
hyphenation-pattern | String, attribute lang, attribute country (optional) | Register a file name for the hyphenation pattern for the mentioned language and country. Language ll and country CC must both consist of two letters. | ll_CC |
source-resolution | Integer | Resolution in dpi (dots per inch) which is used internally to determine the pixel size for SVG images and bitmap images without resolution information. | 72dpi |
target-resolution | Integer | Resolution in dpi (dots per inch) used to specify the output resolution for bitmap images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter effects and such. | 72dpi |
strict-configuration | Boolean | Setting this option to 'true' will cause FOP to strictly verify the contents of the FOP configuration file to ensure that defined resources (such as fonts and base URLs/directories) are valid and available to FOP. Any errors found will cause FOP to immediately raise an exception. | false |
strict-validation | Boolean | Setting this option to 'false' causes FOP to be more forgiving about XSL-FO validity, for example, you're allowed to specify a border on a region-body which is supported by some FO implementations but is non-standard. Note that such a border would currently have no effect in Apache FOP. | true |
break-indent-inheritance | Boolean | Setting this option to 'true' causes FOP to use an alternative rule set to determine text indents specified through margins, start-indent and end-indent. Many commercial FO implementations have chosen to break the XSL specification in this aspect. This option tries to mimic their behaviour. Please note that Apache FOP may still not behave exactly like those implementations either because FOP has not fully matched the desired behaviour and because the behaviour among the commercial implementations varies. The default for this option (i.e. false) is to behave exactly like the specification describes. | false |
default-page-settings | n/a | Specifies the default width and height of a page if "auto" is specified for either or both values. Use "height" and "width" attributes on the default-page-settings element to specify the two values. | "height" 11 inches, "width" 8.26 inches |
use-cache | Boolean | All fonts information that has been gathered as a result of "directory" or "auto-detect" font configurations will be cached for future rendering runs. This setting should improve performance on systems where fonts have been configured using the "directory" or "auto-detect" tag mechanisms. By default this option is switched on. | true |
cache-file | String | This option specifies the file/directory path of the fop cache file. This file is currently only used to cache font triplet information for future reference. | ${base}/conf/fop.cache |
renderers | MIME | Contains the configuration for each renderer | n/a |
FILES¶
/etc/fop.conf
~/.foprc
fop.xconf
EXAMPLES¶
fop foo.fo foo.pdf
fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
fop -xml foo.xml -xsl foo.xsl -foout foo.fo
fop foo.fo -mif foo.rtf
fop foo.fo -print
AUTHORS¶
Apache Foundation
Thomas Schraitle
02/20/2024 | xmlgraphics-fop 1.1 |