1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
<HEAD>
<TITLE>Running FOP</TITLE>
<META NAME="keywords" CONTENT="FOP, fop, XSL, xsl">
<META NAME="description" CONTENT="FOP is a formatter that produces PDF from XSL formatting objects">
<LINK REL="stylesheet" HREF="fop.css">
</HEAD>
<BODY>
<DIV CLASS="HEADING">
<DIV CLASS="NAV"><A HREF="/" TITLE="Back to James Tauber's Home Page">James Tauber</A> > <A HREF="/#software" TITLE="Back to List of Software">Software</A> > <A HREF="./" TITLE="Back to FOP Home Page">FOP</A></DIV>
<H1>Running FOP</H1>
</DIV>
<TABLE BORDER="0" CELLSPACING="10">
<TR>
<TD VALIGN=TOP WIDTH="180">
<DIV ID="SIDENAV">
<P><A HREF="./">FOP Home Page</A></P>
<P><A HREF="download.html">Download FOP</A></P>
<P CLASS="SELECTED">Running FOP</P>
<P><A HREF="examples.html">Examples</A></P>
<P><A HREF="embedding.html">Embedding FOP</A></P>
<P><A HREF="source.html">Source Code</A></P>
<P><A HREF="implemented.html">What's Implemented</A></P>
<P><A HREF="todo.html">To Do / Known Bugs</A></P>
<P><A HREF="changes.html">Version History</A></P>
<P><A HREF="acknowledge.html">Acknowledgements</A></P>
<P><A HREF="specs.html">Relevant Specs</A></P>
<P><A HREF="links.html">Related Links</A></P>
</DIV>
</TD>
<TD>
<DIV ID="MAIN">
<P>There are two ways of running FOP from the command line.</P>
<H2>Method One</H2>
<P>One is to first use an XSLT engine to produce the formatting object tree as an XML document and then running the class <CODE>com.jtauber.fop.apps.CommandLine</CODE> with the formatting object file name and PDF filename as arguments. You will need to include FOP, <A HREF="http://www.megginson.com/SAX/">SAX</A> and your SAX Parser in your classpath and so you might invoke
<P><CODE>java -cp fop_<VAR>x</VAR>_<VAR>xx</VAR>_<VAR>x</VAR>.jar;sax.jar;xp.jar com.jtauber.fop.apps.CommandLine <VAR>formatting-tree-file</VAR> <VAR>pdf-file</VAR></CODE></P>
<P>If your SAX Parser is other than <A HREF="http://www.jclark.com/xml/xp/">XP</A>, you will need to set the property <CODE>org.xml.sax.parser</CODE> to the SAX Parser class to use.</P>
<H2>Method Two</H2>
<P>Rather than performing transformation with an XSLT before invoking FOP, it is possible, if you use <A HREF="http://www.jclark.com/xml/xt.html">XT</A> as your XSLT engine, to just call FOP and have it call <A HREF="http://www.jclark.com/xml/xt.html">XT</A> for you. To do this, run the class <CODE>com.jtauber.fop.apps.XTCommandLine</CODE> with the source XML file name, XSL file name and PDF file name as arguments. You will need to include FOP, <A HREF="http://www.megginson.com/SAX/">SAX</A>, your SAX Parser and <A HREF="http://www.jclark.com/xml/xt.html">XT</A> in your classpath and so you might invoke
<P><CODE>java -cp fop_<VAR>x</VAR>_<VAR>xx</VAR>_<VAR>x</VAR>.jar;sax.jar;xp.jar;xt.jar com.jtauber.fop.apps.XTCommandLine <VAR>xml-file</VAR> <VAR>xsl-file</VAR> <VAR>pdf-file</VAR></CODE></P>
<P>Again, if your SAX Parser is other than <A HREF="http://www.jclark.com/xml/xp/">XP</A>, you will need to set the property <CODE>org.xml.sax.parser</CODE> to the SAX Parser class to use.</P>
</DIV>
</TD>
</TABLE>
<ADDRESS>
<A HREF="http://www.jtauber.com/" TITLE="James Tauber's Home Page">James Tauber</A> / <A HREF="mailto:jtauber@jtauber.com" TITLE="Email James Tauber">jtauber@jtauber.com</A>
<BR>Last updated: 1999-09-16
</ADDRESS>
</BODY>
</HTML>
|