Installation of fop

Ensure $JAVA_HOME is set correctly
before beginning the build. To build the JIMI SDK and/or XMLUnit extension classes, ensure the
corresponding .jar files can be found
via the CLASSPATH environment variable.

Installing fop Components

Compile fop by running the
following commands:

ant compile &&
ant jar-main &&
ant javadocs &&
mv build/javadocs .

If Forrest is installed, build
the full set of documentation:

ant docs

To test the application, run ant
junit-all. The hyphenation tests will fail. To
see a list of other test targets, use ant -p. You must run the tests
from an X-window using a GL-aware Xorg server or some of the JUnit tests will hang.

Command Explanations

ant target: This reads the file
build.xml and builds the target
files.

ln -v -sf fop-1.1
/opt/fop: This is optional and creates a
convenience symlink so that $FOP_HOME
doesn't have to be changed each time there's a package version
change.

Configuring fop

Config Files

~/.foprc

Configuration Information

Using fop to process some large
FO's (including the FO derived from the BLFS XML sources), can
lead to memory errors. Unless you add a parameter to the
java command used
in the fop script
you may receive messages similar to the one shown below:

To avoid errors like this, you need to pass an extra parameter to
the java command
used in the fop
script. This can be accomplished by creating a ~/.foprc (which is sourced by the fop script) and adding the
parameter to the FOP_OPTS environment
variable.

The fop script
looks for a FOP_HOME environment
variable to locate the fop class
libraries. You can create this variable using the ~/.foprc file as well. Create a ~/.foprc file using the following commands:

Replace <RAM_Installed> with a
number representing the amount of RAM installed in your computer
(in megabytes). An example would be FOP_OPTS="-Xmx768m".

To include the fop
script in your path, update your personal or system-wide profile
with the following:

PATH=$PATH:/opt/fop

Note

Running fop can
be somewhat verbose. The default logging level can be changed
from INFO to any of FINEST, FINER, FINE, CONFIG, INFO, WARNING,
SEVERE, ALL, or OFF. To do this, edit $JAVA_HOME/jre/lib/logging.properties and
change the entries for .leval and
java.util.logging.ConsoleHandler.level to the
desired value.

Contents

Installed Programs:fop

Installed Libraries:fop.jar and numerous support library
classes located in /opt/fop/{build,lib}; JAI components include
libmlib_jai.so, jai_codec.jar, jai_core.jar, and
mlibwrapper_jai.jar

Installed Directory:/opt/fop-1.1

Short Descriptions

fop

is a wrapper script to the java command which sets
up the fop environment
and passes the required parameters.