fop1
Command line wrapper for the java version of fop.
Usage
fop [options]
[{-fo | -xml}]
infile
[-xsl
file]
[{-awt | -pdf | -mif | -rtf | -tiff | -png | -pcl | -ps | -txt | -at
[mime] | -print}]
<outfile>
Overview
Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PS, PCL, AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser extent, RTF and TXT. The primary output target is PDF.
Options
-
-version -
print FOP version and exit
-
-x -
dump configuration settings
-
-c cfg.xml -
use additional configuration file cfg.xml
-
-l lang -
the language to use for user information
-
-nocs -
disable complex script features
-
-r -
relaxed/less strict validation (where available)
-
-dpi xxx -
target resolution in dots per inch (dpi) where xxx is a number
-
-s -
for area tree XML, down to block areas only
-
-v -
run in verbose mode (currently simply print FOP version and continue)
-
-o [password] -
PDF file will be encrypted with option owner password
-
-u [password] -
PDF file will be encrypted with option user password
-
-noprint -
PDF file will be encrypted without printing permission
-
-nocopy -
PDF file will be encrypted without copy content permission
-
-noedit -
PDF file will be encrypted without edit content permission
-
-noannotations -
PDF file will be encrypted without edit annotation permission
-
-nofillinforms -
PDF file will be encrypted without fill in interactive form fields permission
-
-noaccesscontent -
PDF file will be encrypted without extract text and graphics permission
-
-noassembledoc -
PDF file will be encrypted without assemble the document permission
-
-noprinthq -
PDF file will be encrypted without print high quality permission
-
-a -
enables accessibility features (Tagged PDF etc., default off)
-
-pdfprofile prof -
PDF file will be generated with the specified profile (Examples for prof: PDF/A-1b or PDF/X-3:2003)
-
-conserve -
enable memory-conservation policy (trades memory-consumption for disk I/O) (Note: currently only influences whether the area tree is serialized.)
-
-cache -
specifies a file/directory path location for the font cache file
-
-flush -
flushes the current font cache file
Input
- infile
-
xsl:fo input file (the same as the next) (use '-' for infile to pipe input from stdin)
-fo-
infile xsl:fo input file
-xmlinfile-
xml input file, must be used together with
-xsl
-atininfile-
area tree input file
-ifininfile-
intermediate format input file
-imageininfile-
image input file (piping through stdin not supported)
-xslstylesheet-
xslt stylesheet
-paramname value <value> to use for parameter <name> in xslt stylesheet-
(repeat '-param name value' for each parameter)
-catalog-
use catalog resolver for input XML and XSLT files
Output
- outfile
-
input will be rendered as PDF into outfile (use '-' for outfile to pipe output to stdout)
-pdfoutfile-
input will be rendered as PDF (outfile req'd)
-pdfa1boutfile-
input will be rendered as PDF/A-1b compliant PDF (outfile req'd, same as "-pdf outfile
-pdfprofilePDF/A-1b")
-awt-
input will be displayed on screen
-rtfoutfile-
input will be rendered as RTF (outfile req'd)
-pcloutfile-
input will be rendered as PCL (outfile req'd)
-psoutfile-
input will be rendered as PostScript (outfile req'd)
-afpoutfile-
input will be rendered as AFP (outfile req'd)
-tiffoutfile-
input will be rendered as TIFF (outfile req'd)
-pngoutfile-
input will be rendered as PNG (outfile req'd)
-txtoutfile-
input will be rendered as plain text (outfile req'd)
-at[mime] out-
representation of area tree as XML (outfile req'd) specify optional mime output to allow the AT to be converted to final format later
-if[mime] out-
representation of document in intermediate format XML (outfile req'd) specify optional mime output to allow the IF to be converted to final format later
-print-
input file will be rendered and sent to the printer see options with "-print help"
-outmime outfile input will be rendered using the given MIME type-
(outfile req'd) Example: "-out application/pdf D:\out.pdf" (Tip: "-out list" prints the list of supported MIME types and exits)
-svgoutfile-
input will be rendered as an SVG slides file (outfile req'd) Experimental feature - requires additional fop-sandbox.jar.
-fooutoutfile-
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)
Examples
-
fop foo.fo foo.pdf
fop
-fofoo.fo-pdffoo.pdf (does the same as the previous line)fop
-xmlfoo.xml-xslfoo.xsl-pdffoo.pdffop
-xmlfoo.xml-xslfoo.xsl-fooutfoo.fofop
-xml--xslfoo.xsl-pdf-fop foo.fo
-miffoo.miffop foo.fo
-rtffoo.rtffop foo.fo
-printfop foo.fo
-awt
Hyphenation
fop can make use of external hyphenation rules that can be supplied in the form of a hyphenation jar. You can find such a one at http://offo.sourceforge.net/.
To actually use that, set the FOP_HYPHENATION_PATH environment variable to the full path of this file, or use configuration files, see below.
Configuration files
fop reads two configuration files on startup: /etc/fop.conf and $HOME/.foprc. These are plain shell script files where you can define for instance the FOP_HYPHENATION_PATH variable.
Another way to extend is conf.d/ files. Simply add a configuration file into /etc/fop.conf.d/my.conf.
Java-wrappers note
This program is a shell script wrapper based on java-wrappers(7). You therefore benefit from several features; please see the java-wrappers(7) manual page for more information about them.
Releases
11 releases since Debian 3.1 (Sarge); the text changed 8 times.
-a since Debian 7 (Wheezy);
-cache since Debian 8 (Jessie);
-conserve since Debian 7 (Wheezy);
-dpi since Debian 7 (Wheezy);
-flush since Debian 8 (Jessie);
-noaccesscontent since Debian 8 (Jessie);
-noannotations since Debian 7 (Wheezy);
-noassembledoc since Debian 8 (Jessie);
-nocopy since Debian 7 (Wheezy);
-nocs since Debian 8 (Jessie);
-noedit since Debian 7 (Wheezy);
-nofillinforms since Debian 8 (Jessie);
-noprint since Debian 7 (Wheezy);
-noprinthq since Debian 8 (Jessie);
-o since Debian 7 (Wheezy);
-pdfprofile since Debian 7 (Wheezy);
-r since Debian 7 (Wheezy);
-s since Debian 7 (Wheezy);
-u since Debian 7 (Wheezy);
-v since Debian 7 (Wheezy);
-version since Debian 7 (Wheezy).
-d until Debian 8 (Jessie);
-q until Debian 8 (Jessie).