git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193715 13f79535-47bb-0310-9956-ffa450edef68pull/32/head
<p><code>driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</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.fo.StandardElementMapping");</code></p> | ||||
<p><code>driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</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.setWriter(new PrintWriter(new FileWriter(args[1])));</code></p> | <p><code>driver.setWriter(new PrintWriter(new FileWriter(args[1])));</code></p> | ||||
<p></p> | <p></p> | ||||
<p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p> | <p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p> | ||||
</p> | </p> | ||||
</s2> | </s2> | ||||
</s1> | |||||
<s2 title="SVG"> | |||||
<p> | |||||
FOP supports some svg rendering. SVG is supported as an instream-foreign-object | |||||
embedded in an FO document. FOP also supports rendering of an external SVG image. | |||||
</p> | |||||
<p> | |||||
Since the intream object that contains the SVG returns a single fo area then | |||||
the construction of the SVG document is handled differently. The SVG is created | |||||
by calling the <code>createGraphic()</code> on each SVG element. The element is then | |||||
responsible for loading the necessary information and child elements and creating | |||||
the corresponding SVG DOM element. When the FO tree is being layed out the | |||||
SVG tree is turned into the SVG DOM document which is stored for later rendering. | |||||
</p> | |||||
<p> | |||||
The SVG document is then held as a DOM tree which is then rendered by going through | |||||
the elements of the tree and rendering then in turn. | |||||
</p> | |||||
<p> | |||||
For more information see the SVG documentation. | |||||
</p> | |||||
</s2> | |||||
</s1> |
<p><code>driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</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.fo.StandardElementMapping");</code></p> | ||||
<p><code>driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</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.setWriter(new PrintWriter(new FileWriter(args[1])));</code></p> | <p><code>driver.setWriter(new PrintWriter(new FileWriter(args[1])));</code></p> | ||||
<p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p> | <p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p> | ||||
<p><code>driver.format();</code></p> | <p><code>driver.format();</code></p> |
</p> | </p> | ||||
<p>c) Fop supports SVG (see <jump href="implemented.html">Features</jump> for further information) and | <p>c) Fop supports SVG (see <jump href="implemented.html">Features</jump> for further information) and | ||||
needs the w3c.jar library. This library comes with Fop (xml-fop/lib) and must | needs the w3c.jar library. This library comes with Fop (xml-fop/lib) and must | ||||
be included in your classpath | |||||
be included in your classpath. The jar file w3c.jar is the compiled classes for the | |||||
java svg bindings with some other DOM classes that are used by the SVG DOM bindings. | |||||
The source for the svg java binding classes can be found at - <jump href="http://www.w3.org/TR/2000/CR-SVG-20000802/java.html"> | |||||
SVG Java bindings</jump>, currently they correspond to the CR-SVG-20000802 specification document. | |||||
The other required files can be found at <jump href="http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/java-binding.html">W3C DOM Java binding</jump>. | |||||
</p> | </p> | ||||
<p>d) Optional: Fop supports the jimi library for image processing, if it is in your classpath | <p>d) Optional: Fop supports the jimi library for image processing, if it is in your classpath | ||||
when you build Fop. | when you build Fop. |