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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
<HEAD>
<TITLE>Embedding 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>Embedding 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><A HREF="running.html">Running FOP</A></P>
<P><A HREF="examples.html">Examples</A></P>
<P CLASS="SELECTED">Embedding FOP</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 VALIGN=TOP>
<DIV ID="MAIN">
<P>FOP can be embedded in other Java applications (such as XSLT engines) using either <A HREF="http://www.megginson.com/SAX/">SAX</A> or <A HREF="http://www.w3.org/DOM/">DOM</A>.</P>
<H2>Embedded using SAX</H2>
<P>You give FOP a SAX Parser, SAX InputSource and Java PrintWriter.</P>
<P>Instantiate <CODE>com.jtauber.fop.apps.SAXProcessor(org.xml.sax.Parser, org.xml.sax.InputSource)</CODE> then run that object's method <CODE>format(java.io.PrintWriter)</CODE>. <CODE>format</CODE> throws a <CODE>com.jtauber.fop.apps.FOPException</CODE>.</P>
<H2>Embedded using DOM</H2>
<P>You give FOP a DOM Document and Java PrintWriter.</P>
<P>Instantiate <CODE>com.jtauber.fop.apps.DOMProcessor(org.w3c.dom.Document)</CODE> then run that object's method <CODE>format(java.io.PrintWriter)</CODE>. <CODE>format</CODE> throws a <CODE>com.jtauber.fop.apps.FOPException</CODE>.
</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-06-22
</ADDRESS>
</BODY>
</HTML>
|