<external href="../index.html" label="Home"/>
<separator/>
<document id="index" label="Readme" source="fop/readme.xml"/>
+ <document id="todo" label="TODO" source="fop/todo.xml" />
<document id="download" label="Download" source="fop/download.xml" />
<document id="running" label="Running FOP" source="fop/running.xml" />
<document id="implemented" label="Features" source="fop/implemented.xml" />
<source>Driver driver = new Driver();<br/>
driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);<br/>
-driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");<br/>
-driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");<br/>
-driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");<br/>
-driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");<br/>
driver.setOutputStream(new FileOutputStream(args[1]));<br/>
-driver.buildFOTree(parser, fileInputSource(args[0]));<br/>
-driver.format();<br/>
-driver.render();</source>
+driver.render(parser, inputHandler.getInputSource());</source>
</s2>
<s2 title="Formatting Object Tree">
can start one of these scripts, you have to setup your classpath and the environment variable JAVA_HOME (see below).</p>
<p> The compilation uses Ant,
a replacement of make (you can find more information about Ant at
- <jump href="http://jakarta.apache.org/ant/">jakarte.apache.org</jump>).
+ <jump href="http://jakarta.apache.org/ant/">jakarta.apache.org</jump>).
build.xml is the replacement of makefile. Look there for detailed information on the build
process and different targets. </p>
<p>A help screen is shown by calling "build usage".</p>
<?xml version="1.0" standalone="no"?>
-
<!-- Embedding FOP -->
<s1 title="Embedding FOP ">
<s2 title="Overview">
<p>Instantiate org.apache.fop.apps.Driver. Once this class is
instantiated, methods are called to set the
- Renderer to use, the (possibly multiple) ElementMapping(s) to
- use and the OutputStream to use to output the results of the
+ Renderer to use
+ and the OutputStream to use to output the results of the
rendering (where applicable). In the case of the Renderer and
ElementMapping(s), the Driver may be supplied either with the
object itself, or the name of the class, in which case Driver will
]]></source>
- <p>Once the Driver is set up, the buildFOTree method
+ <p>Once the Driver is set up, the render method
is called. Depending on whether DOM or SAX is being used, the
- invocation of the method is either buildFOTree(Document) or
- buildFOTree(Parser, InputSource) respectively.
+ invocation of the method is either render(Document) or
+ render(Parser, InputSource) respectively.
</p>
<p>A third possibility may be used to build the FO Tree, namely
calling getContentHandler() and firing the SAX events yourself.
<source><![CDATA[
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PDF);
- driver.buildFOTree(parser, fileInputSource(args[0]));
- driver.format();
+ driver.setInputSource(new FileInputSource(args[0]));
driver.setOutputStream(new FileOutputStream(args[1]));
- driver.render();
+ driver.run();
]]></source>
<p>You can also specify an xml and xsl file for the input.
</p>
driver.setRenderer(Driver.RENDER_PDF);
InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
XMLReader parser = inputHandler.getParser();
- driver.buildFOTree(parser, inputHandler);
- driver.format();
driver.setOutputStream(new FileOutputStream(outFile));
- driver.render();
+ driver.render(parser, inputHandler.getInputSource());
]]></source>
<p>Have a look at the classes CommandLineStarter or FopServlet for complete examples.</p>
</s2>
<?xml version="1.0" standalone="no"?>
-<s1 title="FOP extensions to xsl:fo">
+<s1 title="Extensions to FOP">
<p>Sometimes it is desirable to have extensions to xsl:fo in order to support some feature of the
output format which isn't covered by the xsl:fo specification.
- To use the Fop extensions, you need to add a namespace entry for
+ </p>
+ <s2 title="Default Extensions">
+<p>
+These extension are available by default. They are automatically loaded
+and you only need to provide the correct namespace for your embedded
+xml markup.
+</p>
+ <s3 title="SVG">
+Please see the <jump href="svg.html">SVG page</jump> for more details.
+ </s3>
+ <s3 title="Bookmarks">
+ <p>To use this standard Fop extension, you need to add a namespace entry for
http://xml.apache.org/fop/extensions on the root element. </p>
- <s2 title="Bookmarks">
- <p>You can provide outlines inside the root object (but outside any page-sequences or
+
+ <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"
<p>It works similarly to a basic-link. There is also an external-destination
property, but it isn't supported currently. See the pdfoutline.fo file in
docs/examples/fo for a more complete example.</p>
+ </s3>
+ </s2>
+ <s2 title="Adding Your Own">
+<p>
+To add your own extension you need to do the following things.
+</p>
+<p>
+Write code that implements your extension functionality.
+The easiest place to start is by looking at the code in org.apache.fop.extension.
+</p>
+<p>
+Create a jar file with your classes, it must also include the following file "/META-INF/services/org.apache.fop.fo.ElementMapping". In this file you need to put the fully qualified classname of your element mappings class. This class must implement the "org.apache.fop.fo.ElementMapping" interface.
+</p>
+<p>
+Create your fo file with the extra xml data embedded in the file with the correct name space. The examples for svg and pdfoutline.fo show how this can be done.
+</p>
+<p>
+Put your jar file in the classpath and then run fop over the fo file.
+</p>
+
</s2>
</s1>
<s1 title="Frequently Asked Questions">
- <p>The Fop faq has an own site. Please look here:
+ <s2 title="Introduction">
+ <p>
+ Here we have some answers to common questions about FOP. This only covers
+ general information about getting started with FOP and pointers to more
+ information.
+ </p>
+ <p>
+ For up to date information or more details please visit the Fop FAQ site.
+ The site uses Jyve to provide an interactive FAQ:
<jump href="http://www.owal.co.uk:8090/asf/servlet/asf/screen/DisplayTopics/action/SetAll/project_id/18/faq_id/276">http://www.OWAL.co.uk:8090/</jump>
</p>
+ </s2>
+ <s2 title="Questions">
+ <ul>
+ <li><jump href="#q1">What is FOP?</jump></li>
+ <li><jump href="#q2">How does FOP interact with other Apache Projects?</jump></li>
+ <li><jump href="#q3">What is XSL (FO)?</jump></li>
+ <li><jump href="#q4">What can I do with FOP?</jump></li>
+ <li><jump href="#q5">How can I contribute?</jump></li>
+ <li><jump href="#q6">How do I author XSL documents?</jump></li>
+ <li><jump href="#q7">How can I see a demo?</jump></li>
+ </ul>
+ </s2>
+ <s2 title="Answers">
+ <s3 title="What is FOP">
+<anchor name="q1"></anchor>
+ <p>
+ FOP is a print formatter for XSL formatting objects.
+ </p>
+ <p>
+ It can be used to render an XML file containing XSL formatting objects
+ into a page layout. The main target is PDF but other rendering targets
+ are supported, such as AWT, PCL, text and direct printing.
+ </p>
+ </s3>
+ <s3 title="How does FOP interact with other Apache Projects?">
+<anchor name="q2"></anchor>
+ <p>
+ FOP is distributed with <jump href="http://xml.apache.org/cocoon">Cocoon</jump> as a PDF serializer for XSL (FO) documents.
+ </p>
+ <p>
+ <jump href="http://xml.apache.org/batik">Batik</jump> can be used with FOP to <jump href="http://xml.apache.org/batik/svgrasterizer.html">transcode an SVG image</jump> into a PDF document.
+ The mime type for PDF is "application/pdf".
+ </p>
+ </s3>
+ <s3 title="What is XSL (FO)">
+<anchor name="q3"></anchor>
+ <p>
+ </p>
+ </s3>
+ <s3 title="What can I do with FOP">
+<anchor name="q4"></anchor>
+ <p>
+ </p>
+ </s3>
+ <s3 title="How can I contribute">
+<anchor name="q5"></anchor>
+ <p>
+ </p>
+ </s3>
+ <s3 title="How do I author XSL documents">
+<anchor name="q6"></anchor>
+ <p>
+ </p>
+ </s3>
+ <s3 title="How can I see a demo">
+<anchor name="q7"></anchor>
+ <p>
+ There will be a Java Webstart demo sometime in the future.
+ </p>
+ </s3>
+ </s2>
+
</s1>
<!-- Testing FOP -->
<s1 title="Testing FOP">
- <s2 title="">
+ <s2 title="Running and Using Tests">
<p>
Testing is an important part of getting FOP to operate correctly and conform to the
necessary standards.
--- /dev/null
+<?xml version="1.0" standalone="no"?>
+
+<!-- SVG in FOP -->
+
+<s1 title="TODO List for FOP">
+ <s2 title="FOP TODO">
+ <p>
+Core Features - these are the areas that are important to getting fop
+to be useable for general use.
+ </p>
+ <p>
+Processing improvements - these are mainly things that can be improved
+in the way fop works, eg. resources usage, pdf output etc.
+ </p>
+ <p>
+Enhancements - these are added functionality that might be useful, no
+comment is made about the suitability of these suggestions.
+ </p>
+ </s2>
+ <s2 title="Core Features">
+<s3 title="Layout">
+ <p>
+This is the crucial part to getting FOP to make it to the next step.
+ </p>
+</s3>
+<s3 title="Webstart Demo">
+ <p>
+a demo using Java Webstart that runs the awt viewer and supports
+linking from an index
+ </p>
+</s3>
+<s3 title="Website">
+ <p>
+Need to improve the website to better demonstrate what fop is and
+can do. Examples, screenshots, pdf documents.
+ </p>
+</s3>
+<s3 title="Property Support">
+ <p>
+Currently all properties are in the xml file. We need to handle all default
+values properly (including ones that change depending on the element) and
+all possible values.
+ </p>
+</s3>
+<s3 title="Property Resolution">
+ <p>
+This is support for the functions in property values that evaluate some
+expression.
+Better support for resolution including support for "inherit" and values
+with lists.
+ </p>
+</s3>
+<s3 title="Validity Checking">
+ <p>
+Check the validity of children for a particular element to ensure
+there are no invalid children. Should help process the layout better.
+ </p>
+</s3>
+</s2>
+ <s2 title="Processing Improvements">
+<s3 title="Logging">
+ <p>
+Support for proper logging with logKit.
+ </p>
+</s3>
+<s3 title="Image Handling">
+ <p>
+Needs to be a bit more solid and allow for direct insertion of images
+(jpeg) into the pdf.
+ </p>
+</s3>
+<s3 title="Configuration">
+ <p>
+Support for avalon. Better multithread handling.
+ </p>
+</s3>
+<s3 title="More PDF Outputs">
+ <p>
+Support for streaming and linearized pdf to help with different
+deployement of pdf documents.
+ </p>
+</s3>
+<s3 title="i18n in awt viewer">
+ <p>
+Use proper i18n handling for awt viewer.
+ </p>
+</s3>
+<s3 title="better abstraction of rendering classes">
+ <p>
+put all common rendering processes into an abstract class that has
+no dependancies on any specific renderers.
+ </p>
+</s3>
+</s2>
+ <s2 title="Enhancements">
+<s3 title="linking support in svg">
+ <p>
+support the a link rendering for the svg output.
+ </p>
+</s3>
+<s3 title="input from url">
+ <p>
+be able to specify a url as the input fo (or xml, xsl) documents.
+ </p>
+</s3>
+<s3 title="improve text handling in svg">
+ <p>
+support (better) the direct rendering of text into pdf graphics
+and other similair outputs
+ </p>
+</s3>
+<s3 title="svg renderer (output to svg doc for slide presentation)">
+ <p>
+Create an SVGRenderer that will render all pages onto a single
+svg document suitable for slide show presentations (with batik)
+suggested by Vincent Hardy.
+ </p>
+</s3>
+<s3 title="stream encoding">
+ <p>
+support for different encoding on different types of streams
+in pdf document.
+ </p>
+</s3>
+<s3 title="svg features">
+ <p>
+currently patterns and gradients are not generated properly
+ </p>
+</s3>
+
+ </s2>
+
+
+</s1>
+