]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Updated docs for new Driver.
authorKelly Campbell <kellyc@apache.org>
Sat, 3 Mar 2001 07:51:27 +0000 (07:51 +0000)
committerKelly Campbell <kellyc@apache.org>
Sat, 3 Mar 2001 07:51:27 +0000 (07:51 +0000)
Added reference to pdfoutline.fo example
PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194115 13f79535-47bb-0310-9956-ffa450edef68

docs/html-docs/embedding.html
docs/html-docs/extensions.html
docs/xml-docs/fop/embedding.xml
docs/xml-docs/fop/extensions.xml
docs/xml-docs/makedoc.sh

index 4c2de2ebff58dbf9811cbb15273adf49b5b11d35..6254d9cefcc6d034b1f5e07836d0d71d15422c30 100644 (file)
      instantiate the class itself. The advantage of the latter is it
      enables runtime determination of Renderer and ElementMapping(s).
   </P>
+  <P>The simplest way to use Driver is to instantiate it with the 
+     InputSource and OutputStream, then set the renderer desired and 
+     call the run method.
+  </P>
+  <P>Here is an example use of Driver which outputs PDF:
+  </P>
+    <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="4" width="464"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff" width="462"><FONT size="-1"><PRE>
+   Driver driver = new Driver(new InputSource (args[0]), 
+                              new FileOutputStream(args[1]));
+   driver.setRenderer(RENDER_PDF);
+   driver.run();
+</PRE></FONT></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
+
+
   <P>Once the Driver is set up, the buildFOTree method
      is called. Depending on whether DOM or SAX is being used, the
      invocation of the method is either buildFOTree(Document) or
      called in that order.
   </P>
   <P>Here is an example use of Driver:</P>
-  <P><CODE><FONT face="courier, monospaced">Driver driver = new Driver();</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.setRenderer(&quot;org.apache.fop.render.pdf.PDFRenderer&quot;, version);</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.addElementMapping(&quot;org.apache.fop.fo.StandardElementMapping&quot;);</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.addElementMapping(&quot;org.apache.fop.svg.SVGElementMapping&quot;);</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.addPropertyList(&quot;org.apache.fop.fo.StandardPropertyListMapping&quot;);</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.addPropertyList(&quot;org.apache.fop.svg.SVGPropertyListMapping&quot;);</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.setOutputStream(new FileOutputStream(args[1]));</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.buildFOTree(parser, fileInputSource(args[0]));</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.format();</FONT></CODE></P>
-  <P><CODE><FONT face="courier, monospaced">driver.render();</FONT></CODE></P>
-  <P>Have a look at the classes CommandLine or XalanCommandLine for complete examples.</P>
+  <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="4" width="464"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff" width="462"><FONT size="-1"><PRE>
+  Driver driver = new Driver();
+  driver.setRenderer(Driver.RENDER_PDF);
+  driver.buildFOTree(parser, fileInputSource(args[0]));
+  driver.format();
+  driver.setOutputStream(new FileOutputStream(args[1]));
+  driver.render();
+</PRE></FONT></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
+  <P>Have a look at the classes CommandLineStarter or FopServlet for complete examples.</P>
   </FONT></TD></TR></TABLE><BR>
   <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="666699" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="resources/void.gif" vspace="0" width="2"><B>Using Fop in a servlet</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">  
      <P>In the directory xml-fop/docs/examples/embedding you can find a working example how to use
index 5f77ef63dfe16352fd93bf694cc51e7f88d5db0c..4ffe06d43467436f948003c1c639a662677b8067 100644 (file)
   <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="666699" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="resources/void.gif" vspace="0" width="2"><B>Bookmarks</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">
     <P>You can provide outlines inside the root object (but outside any page-sequences or
        other formatting objects). Here's an example of an outline entry:</P>
+    <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="4" width="464"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff" width="462"><FONT size="-1"><PRE>
+    &lt;fo:root xmlns:fo=&quot;http://www.w3.org/1999/XSL/Format&quot;
+             &amp;#160;&amp;#160; xmlns:fox=&quot;http://xml.apache.org/fop/extensions&quot;&gt;
+    &lt;fox:outline internal-destination=&quot;sec3&quot;&gt;
+    &amp;#160;&amp;#160;  &lt;fox:label&gt;Running FOP&lt;/fox:label&gt;
 
-    <P><CODE><FONT face="courier, monospaced">&lt;fo:root xmlns:fo=&quot;http://www.w3.org/1999/XSL/Format&quot;
-             &nbsp;&nbsp; xmlns:fox=&quot;http://xml.apache.org/fop/extensions&quot;&gt;</FONT></CODE></P> 
-    <P><CODE><FONT face="courier, monospaced">&lt;fox:outline internal-destination=&quot;sec3&quot;&gt;</FONT></CODE></P>
-    <P><CODE><FONT face="courier, monospaced">&nbsp;&nbsp;  &lt;fox:label&gt;Running FOP&lt;/fox:label&gt;</FONT></CODE></P>
-
-    <P><CODE><FONT face="courier, monospaced">&nbsp;&nbsp;&lt;fox:outline internal-destination=&quot;sec3-1&quot;&gt;</FONT></CODE></P>
-    <P><CODE><FONT face="courier, monospaced">&nbsp;&nbsp;&nbsp;&nbsp;&lt;fox:label&gt;Prerequisites&lt;/fox:label&gt;</FONT></CODE></P>
-    <P><CODE><FONT face="courier, monospaced">&nbsp;&nbsp;&lt;/fox:outline&gt;</FONT></CODE></P>
-    <P><CODE><FONT face="courier, monospaced">&lt;fox:outline&gt;</FONT></CODE></P>
-    <P><CODE><FONT face="courier, monospaced">&lt;/fo:root&gt;</FONT></CODE></P>
+    &amp;#160;&amp;#160;&lt;fox:outline internal-destination=&quot;sec3-1&quot;&gt;
+    &amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;fox:label&gt;Prerequisites&lt;/fox:label&gt;
+    &amp;#160;&amp;#160;&lt;/fox:outline&gt;
+    &lt;fox:outline&gt;
+    &lt;/fo:root&gt;
+</PRE></FONT></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
     <P>It works similarly to a basic-link. There is also an external-destination 
-       property, but it isn't supported currently.</P>
+       property, but it isn't supported currently. See the pdfoutline.fo file in 
+      docs/examples/fo for a more complete example.</P>
   </FONT></TD></TR></TABLE><BR>
 </TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1"></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
               Copyright &copy; 1999 The Apache Software Foundation.
index ee70f75c781e1dda14241ea44271da4833ec83f5..5f6e46f940c9949f2c564e07d00e7eb0f5b6552c 100644 (file)
      instantiate the class itself. The advantage of the latter is it
      enables runtime determination of Renderer and ElementMapping(s).
   </p>
+  <p>The simplest way to use Driver is to instantiate it with the 
+     InputSource and OutputStream, then set the renderer desired and 
+     call the run method.
+  </p>
+  <p>Here is an example use of Driver which outputs PDF:
+  </p>
+    <source><![CDATA[
+   Driver driver = new Driver(new InputSource (args[0]), 
+                              new FileOutputStream(args[1]));
+   driver.setRenderer(RENDER_PDF);
+   driver.run();
+]]></source>
+
+
   <p>Once the Driver is set up, the buildFOTree method
      is called. Depending on whether DOM or SAX is being used, the
      invocation of the method is either buildFOTree(Document) or
      called in that order.
   </p>
   <p>Here is an example use of Driver:</p>
-  <p><code>Driver driver = new Driver();</code></p>
-  <p><code>driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</code></p>
-  <p><code>driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");</code></p>
-  <p><code>driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</code></p>
-  <p><code>driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");</code></p>
-  <p><code>driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");</code></p>
-  <p><code>driver.setOutputStream(new FileOutputStream(args[1]));</code></p>
-  <p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p>
-  <p><code>driver.format();</code></p>
-  <p><code>driver.render();</code></p>
-  <p>Have a look at the classes CommandLine or XalanCommandLine for complete examples.</p>
+  <source><![CDATA[
+  Driver driver = new Driver();
+  driver.setRenderer(Driver.RENDER_PDF);
+  driver.buildFOTree(parser, fileInputSource(args[0]));
+  driver.format();
+  driver.setOutputStream(new FileOutputStream(args[1]));
+  driver.render();
+]]></source>
+  <p>Have a look at the classes CommandLineStarter or FopServlet for complete examples.</p>
   </s2>
   <s2 title="Using Fop in a servlet">  
      <p>In the directory xml-fop/docs/examples/embedding you can find a working example how to use
index 8a8ae2b6c4358220e25a509a59856ba4a14d127a..d31ebae2a2826c720f3f1e50098fba866f7d0e10 100644 (file)
@@ -9,19 +9,21 @@
   <s2 title="Bookmarks">
     <p>You can provide outlines inside the root object (but outside any page-sequences or
        other formatting objects). Here's an example of an outline entry:</p>
+    <source>
+    <![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+             &#160;&#160; xmlns:fox="http://xml.apache.org/fop/extensions">
+    <fox:outline internal-destination="sec3">
+    &#160;&#160;  <fox:label>Running FOP</fox:label>
 
-    <p><code>&lt;fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
-             &#160;&#160; xmlns:fox="http://xml.apache.org/fop/extensions"></code></p> 
-    <p><code>&lt;fox:outline internal-destination="sec3"></code></p>
-    <p><code>&#160;&#160;  &lt;fox:label>Running FOP&lt;/fox:label></code></p>
-
-    <p><code>&#160;&#160;&lt;fox:outline internal-destination="sec3-1"></code></p>
-    <p><code>&#160;&#160;&#160;&#160;&lt;fox:label>Prerequisites&lt;/fox:label></code></p>
-    <p><code>&#160;&#160;&lt;/fox:outline></code></p>
-    <p><code>&lt;fox:outline></code></p>
-    <p><code>&lt;/fo:root></code></p>
+    &#160;&#160;<fox:outline internal-destination="sec3-1">
+    &#160;&#160;&#160;&#160;<fox:label>Prerequisites</fox:label>
+    &#160;&#160;</fox:outline>
+    <fox:outline>
+    </fo:root>
+]]></source>
     <p>It works similarly to a basic-link. There is also an external-destination 
-       property, but it isn't supported currently.</p>
+       property, but it isn't supported currently. See the pdfoutline.fo file in 
+      docs/examples/fo for a more complete example.</p>
   </s2>
 </s1>
 
index 5f6937fe8ebebe6ac95ac0fd8dcb9a40ceb96f42..c0876902c29fe50c2b87e179457d9cda17bef9da 100755 (executable)
@@ -13,7 +13,7 @@ if [ "$JAVA_HOME" = "" ] ; then
   exit 1
 fi
 
-LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip:../../lib/ant.jar:../../lib/w3c.jar:../../lib/buildtools.jar:../../build/fop.jar:../../lib\stylebook.jar
+LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip:../../lib/ant.jar:../../lib/w3c.jar:../../lib/buildtools.jar:../../build/fop.jar:../../lib/stylebook.jar
 ANT_HOME=../../lib
 
 echo Building with classpath $CLASSPATH:$LOCALCLASSPATH