XMLGRAPHICS-FOP(1)
π xmlgraphics-fop(1) π
okay so bestie, the header of this page is doing the absolute most: it says XMLGRAPHICS-FOP(1) on both sides, and the URL in the middle is literally http://xmlgraphics.apache. β yes, with the trailing dot and everything. The manual name is xmlgraphics-fop, and this is its man page. We're talking the Formatter for Printing XSLT Processed XML Files. π
πΈ NAME πΈ
xmlgraphics-fop β Formatter for Printing XSLT Processed XML Files.
β¨ SYNOPSIS β¨
okay so here's the shape of the command, copied exactly, no cap:
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, bestie:
-aβ enables accessibility features (Tagged PDF etc.), and the default is off. so if you need that, turn it on. β¨-afp OUTFILEβ input will be rendered as AFP. π-at [mime] OUTFILEβ representation of area tree as XML; specify optional mime output to allow the AT to be converted to final format later. π¦-atin INFILEβ area tree input file. πΈ-awtβ input will be displayed on screen. π-c cfg.xmlβ use additional configuration filecfg.xml. π-catalogβ use XML catalog resolver for input XML and XSLT files. π-conserveβ enable memory-conservation policy (trades memory-consumption for disk I/O) (Note: currently only influences whether the area tree is serialized.) π§-dβ debug mode. π-dpi XXXβ target resolution in dots per inch (dpi) whereXXXis a number. π’-fo INFILEβ XSL-FO input file. π-foout OUTFILEβ input will only be XSL transformed. The intermediate XSL-FO file is saved and no rendering is performed. (Only available if you use-xmland-xslparameters.) π-if [mime] OUTFILEβ representation of document in intermediate format XML; specify optional mime output to allow the IF to be converted to final format later. π¦-ifin INFILEβ intermediate format input file. π-imagein INFILEβ image input file (piping through stdin not supported). πinfileβ XSL-FO input file (use-forinfileto pipe input from stdin); same as-fo. β-l LANGβ use the language for user information. π-noannotationsβ encrypt PDF file without edit annotation permission. π-nocopyβ encrypt PDF file without copy content permission. π-noeditβ encrypt PDF file without edit content permission. π-noprintβ encrypt PDF file without printing permission. π-o PASSWORDβ encrypt PDF file with option owner password. π-out mime OUTFILEβ input will be rendered using the given MIME type. Example:-out application/pdf D:\out.pdf(Tip:-out listprints the list of supported MIME types). πoutfileβ input will be rendered as PDF intooutfile(use-foroutfileto pipe output to stdout). πΎ-param NAME VALUEβNAMEto use for parameterNAMEin XSLT stylesheet (repeat this option for each parameter). π-pcl OUTFILEβ input will be rendered as PCL. π¨οΈ-pdf OUTFILEβ input will be rendered as PDF (outfilerequired). π-pdfa1b OUTFILEβ input will be rendered as PDF/A-1b compliant PDF (outfilerequired, same as-pdf outfile -pdfprofile PDF/A-1b). πβ¨-pdfprofile PROFβ PDF file will be generated with the specified profile (Examples forPROF:PDF/A-1borPDF/X-3:2003). π―-png OUTFILEβ input will be rendered as PNG. πΌοΈ-printβ input file will be rendered and sent to the printer; see options with-print help. π¨οΈ-ps OUTFILEβ input will be rendered as PostScript. π-qβ quiet mode. π€«-rβ relaxed/less strict validation (where available). π-rtf OUTFILEβ input will be rendered as RTF. π-sβ for area tree XML, down to block areas only. π§±-svg OUTFILEβ input will be rendered as an SVG slides file. Experimental feature; requires additionalfop-sandbox.jar. π§ͺ-tiff OUTFILEβ input will be rendered as TIFF. πΌοΈ-txt OUTFILEβ input will be rendered as plain text. π€-u PASSWORDβ encrypt PDF file with option user password. π-vβ run in verbose mode (currently simply print FOP version and continue). π£οΈ-versionβ print FOP version and exit. πͺ-xβ dump configuration settings. ποΈ-xml INFILEβ XML input file, must be used together with-xsl. π§©-xsl STYLESHEETβ XSLT 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 β okay so this is the general config cheat sheet, bestie. Every element below is a little knob in your FOP config file, and here's the tea on all of them π«Ά
baseβ Data type:URL or directory. What it does: specifies the base URL based on which relative URL will be resolved. Default: current directory.font-baseβ Data type:URL or directory. What it does: specifies the base URL based on which relative font URLs will be resolved. Default:baseURL/directory.hyphenation-baseβ Data type:URL or directory. What it does: 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. Default: disabled.
π‘ Real talk: 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β Data type:String, attributelang, attributecountry(optional). What it does: register a file name for the hyphenation pattern for the mentioned language and country. Languagelland countryCCmust both consist of two letters. Default:ll_CC.source-resolutionβ Data type:Integer. What it does: resolution in dpi (dots per inch) which is used internally to determine the pixel size for SVG images and bitmap images without resolution information. Default:72dpi.target-resolutionβ Data type:Integer. What it does: 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. Default:72dpi.strict-configurationβ Data type:Boolean. What it does: 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 β and bestie, if anything's off, FOP does not play. It will immediately raise an exception. No warnings, no gentle nudge, just straight to exception. π
strict-validationβ Boolean β defaulttrue. Set this to'false'and FOP gets a lil more forgiving about XSL-FO validity. Like, suddenly you're allowed to specify a border on aregion-bodyβ which some FO implementations support but which is, lowkey, non-standard. β οΈ Heads up tho: such a border would currently have no effect in Apache FOP. So it's giving "permission granted, vibe denied." πbreak-indent-inheritanceβ Boolean β defaultfalse. Flip this to'true'and FOP uses an alternative rule set to figure out text indents specified through margins,start-indentandend-indent. Why does this exist? Because a bunch of commercial FO implementations chose to break the XSL specification on this one, and this option tries to mimic their behavior. π The tea: Apache FOP may still not behave exactly like those implementations β partly because FOP hasn't fully matched the desired behavior, and partly because the commercial implementations don't even agree with each other (the behavior among them varies, iykyk). The default for this option (i.e.false) is to behave exactly like the specification describes. Spec girlies stay winning. πdefault-page-settingsβ n/a β default"height"11 inches,"width"8.26 inches. This one specifies the default width and height of a page whenever"auto"is specified for either or both values. To set the two values, use the"height"and"width"attributes on thedefault-page-settingselement. πβ¨use-cacheβ Boolean β defaulttrue. All fonts information that's been gathered as a result of"directory"or"auto-detect"font configurations gets cached for future rendering runs. This setting should- that one row whose name scrolled right off the screen π β ngl bestie the first cell is gone but the vibe is clear: this option does something to improve performance on systems where fonts have been configured using the
directoryorauto-detecttag mechanisms. And before you ask β by default this option is switched on. So like, it's already doing its little job, you don't gotta do anything π cache-fileβ type:Stringβ this one specifies the file/directory path of the fop cache file. And what's in it, you ask? Currently this file is only used to cache font triplet information for future reference. That's it. That's the whole personality π β default is${base}/conf/fop.cacherenderersβ type:MIMEβ contains the configuration for each renderer β¨ β default:n/a
πΈ FILES πΈ
/etc/fop.confβ the system-wide configuration, aka the big-picture settings the whole machine shares π«Ά~/.foprcβ your own user configuration, your personal little corner of fop πfop.xconfβ an example configuration file, and yes you can absolutely hand it over with the-coption. Peep the section called βFOP CONFIGURATION FILEβ for the deets π
β¨ EXAMPLES β¨
okay this is the part where it gets fun π¦ these are all literally copy-pasteable, go off:
- Transforms the
foo.foFO file into PDF π₯
fop foo.fo foo.pdf
- Does the same as the previous line β yes, literally identical behaviour, two different ways to say the same thing π
fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
- Transforms and formats
foo.xmlwith the help of the XSLT stylesheetfoo.xslinto the PDF filefoo.pdfβ
fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
- Only transforms, but doesn't format β it's giving "half the job, all the attitude" π
fop -xml foo.xml -xsl foo.xsl -foout foo.fo
- Formats
foo.fointo FRTF π
fop foo.fo -mif foo.rtf
- Input file is send to the printer π¨οΈ β yes, the manpage really said "is send", we're keeping the words exactly as they are, character for character, no cap π«Ά
fop foo.fo -print
π AUTHORS π
- Apache Foundation β the whole entire icon behaviour π
- Thomas Schraitle β credited with the manpage, absolute legend for this one π
That's the whole page bestie, you ate π go forth and render some PDFs β¨
and that's a wrap on xmlgraphics-fop version 1.1, dated 02/06/2026 β page XMLGRAPHICS-FOP(1), mwah ππ¦πΈ
π¦ where this page comes from
- opensuse-leap 16.0: xmlgraphics-fop 2.10-160000.3.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms