In the module XSL Formatting Objects an introduction into XSL-FO is given. In this module we are going to run example programs using the Apache Formatting Objects Processor (FOP). This program is mostly used to produce PDF files.
Summary: The Apache Formatting Objects Processor (FOP) comes with a considerable number of example XSL-FO documents which are useful to learn the the XSL-FO language. It is shown how to shown how to set up FOP and run an example.
Note: You are viewing an old version of this document. The latest version is available here.
In the module XSL Formatting Objects an introduction into XSL-FO is given. In this module we are going to run example programs using the Apache Formatting Objects Processor (FOP). This program is mostly used to produce PDF files.
Make sure you have a Java Runtime Environment (JRE) installed.
Download FOP from xmlgraphics.apache.org/fop/download. Go for a binary download, e.g. fop-1.0-bin.zip. Unzip the file.
For the following it is assumed that the unizipped files are in C:\Documents and Settings\hirzel\My Documents\fop-1.0.
Open a command window or terminal and change the directory to fop-1.0.
Execute the following command fop examples\fo\basic\readme.fo result.pdf.
C:\Documents and Settings\hirzel\My Documents\fop-1.0>fop examples\fo\basic\readme.fo result.pdf
This means that the Apache fop processor is called with readme.fo in the subdirectory examples\fo\basic as input file. The result is put into the file result.pdf.
You may explore the examples folder for more and run them accordingly.
"Running examples with the Apache fop processor"