One is to first use an XSLT engine to produce the formatting object tree as an
XML document and then running the class org.apache.fop.apps.CommandLine with the
formatting object file name and PDF filename as arguments. You need to set classpath
and set the used sax parser according to your enviroment
Classpath settings: You will need to include FOP and your XML Parser
in your classpath and so you might invoke FOP, if Xerces-J is your xml parser:
java -cp fop_bin_0_12_1.jar;xerces.jar
org.apache.fop.apps.CommandLine fo-file pdf-file
If you want to use another sax parser, you will need to set the property
org.xml.sax.parser to any other SAX Parser class to use. The following example shows
the command line, if you use XP from James Clark:
java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver
-cp fop_bin_0_12_1.jar;xerces.jar;xp.jar
org.apache.fop.apps.CommandLine fo-file pdf-file
Note: The xerces jar file must be included, because xp has no dom support.