<?xml version="1.0" standalone="no"?>
<!-- by Arved Sandstrom -->
+<document>
+ <header>
+ <title>Architecture</title>
+ <subtitle>Architecture information for FOP</subtitle>
+ <authors>
+ </authors>
+ </header>
+
+ <body>
<s1 title="FOP Mechanics">
<p><code>  FObjMixed      SequenceSpecifier
</code></p>
-<p>FO's extending FObj:</p>
-
-<p>Package org.apache.fop.fo.pagination:</p>
-
-
-<p><code> LayoutMasterSet</code></p>
-<p><code> PageSequence</code></p>
-<p><code> RegionAfter</code></p>
-<p><code> RegionBefore</code></p>
-<p><code> RegionBody</code></p>
-<p><code> Root</code></p>
-<p><code> SequenceSpecification</code></p>
-<p><code> SimplePageMaster</code></p>
-
-
- <p>Package org.apache.fop.fo.flow:</p>
-
-
-<p><code>BlockContainer</code></p>
-<p><code>DisplayGraphic</code></p>
-<p><code>DisplayRule</code></p>
-<p><code>DisplaySequence</code></p>
-<p><code>Flow</code></p>
-<p><code>InlineGraphic</code></p>
-<p><code>ListBlock</code></p>
-<p><code>ListItem</code></p>
-<p><code>ListItemBody</code></p>
-<p><code>ListItemLabel</code></p>
-<p><code>PageNumber</code></p>
-<p><code>StaticContent</code></p>
-<p><code>Table</code></p>
-<p><code>TableBody</code></p>
-<p><code>TableCell</code></p>
-<p><code>TableColumn</code></p>
-<p><code>TableRow</code></p>
-
-<p>FO's extending SequenceSpecifier:</p>
-
- <p>Package org.apache.fop.fo.pagination:</p>
-
-
-<p><code>SequenceSpecifierAlternating</code></p>
-<p><code>SequenceSpecifierRepeating</code></p>
-<p><code>SequenceSpecifierSingle</code></p>
-
-<p>FO's extending FObjMixed:</p>
-
- <p>Package org.apache.fop.fo.flow:</p>
-
-
<p><code>Block</code></p>
<p><code>Inline</code></p>
<p><code>BasicLink</code></p>
</p>
</s2>
</s1>
+ </body>
+</document>
+
driver.setOutputStream(new FileOutputStream(outFile));
driver.render(parser, inputHandler.getInputSource());]]></source>
<p>Have a look at the classes CommandLineStarter or FopServlet for complete examples.</p>
+<p>
+<note>If your FO files contain SVG then batik will be used. When batik is
+initialised it uses certain classes in <code>java.awt</code> that
+intialises the java AWT classes. This means that a daemon thread
+is created by the jvm and on unix it will need to connect to a
+DISPLAY.
+The thread means that the java application will not automatically quit
+when finished, you will need to call <code>System.exit</code>. These
+issues should be fixed in the upcoming JDK1.4</note>
+</p>
</s2>
<s2 title="Hints">
<p>
<body>
<s1 title="FOP">
<p>
- <figure src="title.jpg" alt="FOP Title" />
+ <figure width="300" height="100" src="title.jpg" alt="FOP Title" />
</p>
<p>FOP is the world's first print formatter driven by XSL formatting
- objects and the world's first output indepent formatter. It is a
+ objects and the world's first output independent formatter. It is a
Java application that reads a formatting object tree and then
renders the resulting pages to a specified output. Output formats
currently supported are PDF, PCL, SVG, XML (area tree representation),
- Print, AWT and TXT.
+ Print, AWT, MIF and TXT.
The primary output target is PDF.
</p>
<p>
- <figure src="document.jpg" alt="Render Diagram" />
+ <figure width="480" height="260" src="document.jpg" alt="Render Diagram" />
</p>
<p>The latest version of Fop is 0.20.2 and it supports the xsl:fo candidate release.
You can <jump href="download.html">download</jump>
<s1 title="Formatting">
<p>
- <figure src="layout.jpg" alt="Formatting Diagram" />
+ <figure width="480" height="260" src="layout.jpg" alt="Formatting Diagram" />
</p>
<p>
This image is a demonstration of a two page document. The xml data on the left
<!-- FOP Relevant Specifications and links -->
+<document>
+ <header>
+ <title>Resources</title>
+ <subtitle>Resources useful for developing and using FOP</subtitle>
+ <authors>
+ </authors>
+ </header>
+
+ <body>
<s1 title="FOP Relevant Specifications and Links">
<s2 title="Specifications">
<li><jump href="http://sax.sourceforge.net/">Simple API for XML (SAX)</jump></li>
<li><jump href="http://www.w3.org/TR/REC-DOM-Level-1">Document Object Model (DOM)</jump></li>
<li><jump href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML Recommendation</jump></li>
- <li><jump href="http://java.sun.com/products/jdk/1.1/docs/index.html">Java JDK 1.1 Documentation</jump></li>
+ <li><jump href="http://java.sun.com/j2se/1.3/docs/api/index.html">Java JDK 1.3 Documentation</jump></li>
</ul>
</s2>
<s2 title="Tutorials/Articles">
</s2>
</s1>
+ </body>
+</document>
<!-- SVG in FOP -->
+<document>
+ <header>
+ <title>SVG</title>
+ <subtitle>Embedding SVG in FOP</subtitle>
+ <authors>
+ </authors>
+ </header>
+
+ <body>
+
<s1 title="SVG in FOP">
<s2 title="Introduction">
<p>
For more information see <jump href="http://xml.apache.org/batik/">Batik</jump> for
how transcoders work.
</p>
+ </s2>
+
+ <s2 title="Important Notes">
+ <p>
+The svg is inserted into PDF by using PDF commands to draw and fill
+lines and curves. This means that the graphical objects created with
+this remain as vector graphics.
+ </p>
+ <p>
+There are a number of SVG things that cannot be converted directly into
+PDF. Parts of the graphic such as effects, patterns and images are inserted
+into the PDF as a raster graphic. The resolution of this graphic may not
+be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic.
+This needs to be improved.
+ </p>
+ <p>
+Another important note is that text is converted and drawn as a
+set of shapes by batik. This means that a typical character will
+have about 10 curves (each curve consists of at least 20 characters).
+This can make the pdf files large and when the pdf is viewed the
+viewer does not normally draw those fine curves very well (turning on
+Smooth Line Art in the Acrobat preferences will fix this).
+If the text is inserted into the PDF using the inbuilt text commands
+for PDF it will use a single character.
+ </p>
+ <p>
+It is possible to make sure that all text is drawn into PDF using the
+PDF text commands by adding the following to the user config:
+<source><![CDATA[<entry>
+ <key>strokeSVGText</key>
+ <value>false</value>
+</entry>]]></source>
+ </p>
+ <p>
+The drawback from this is that all text will be confined to text that is
+possible for PDF fonts (including embedded fonts) and implemented with
+this workaround. The fonts available are the standard pdf fonts and any
+fonts that you have embedded using FOP. The font sizes will be rounded
+to an integer value. In future this will be improved.
+ </p>
+ </s2>
+ <s2 title="Classes">
<p>
These are the relevant classes, found in the package org.apache.fop.svg :
</p>
</s2>
-
</s1>
+ </body>
+</document>
<?xml version="1.0" standalone="no"?>
-<!-- SVG in FOP -->
+<!-- TODO -->
+<document>
+ <header>
+ <title>TODO</title>
+ <subtitle>TODO list for FOP</subtitle>
+ <authors>
+ </authors>
+ </header>
+
+ <body>
<s1 title="TODO List for FOP">
<s2 title="FOP TODO">
</s1>
+ </body>
+</document>
The files in these directory contain the Fop documentation as xml files.
The directory xml-docs/fop is a mirror of the files in the cvs repository
-modul 'xml-site' /sources/fop. These files are used to create the html documentation
-on xml.apache.org.
+modul 'xml-site' /sources/fop. These files are used to create the html
+documentation on xml.apache.org.
-With makedoc.bat (win32) or makedoc.sh (unix) you can create a pdf file containing
-the complete Fop documentation. These scripts use ant. If you have any trouble running them,
-please look into build.xml in the root directory of this distribution.
\ No newline at end of file
+Use the html target in the main build script in the xml-fop root directory.
+You can create a pdf file containing the complete Fop documentation.