blob: a9a19e3185875e23c648c21e1ddc826531eaa391 (
plain)
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
|
<?xml version="1.0" standalone="no"?>
<document>
<header>
<title>Architecture</title>
<subtitle>Architecture information for FOP</subtitle>
<authors>
<person name="Arved Sandstrom"/>
</authors>
</header>
<body>
<s1 title="FOP Mechanics">
<s2 title="Introduction">
<p>
The overall process is controlled by <em>org.apache.fop.apps.Driver</em>.
This class handles the FO Tree building, renderers, output and logging.
</p>
<p>
The process in general is that the FO document is sent to the tree
builder via SAX events. This creates an FO Tree. The FO Tree is then
handled by the layout processor which converts the FO Tree into an area
tree. This area tree is then given to the renderer and the renderer converts
the area tree into a stream of data containing the output document.
</p>
</s2>
<s2 title="Formatting Object Tree">
<p>
The class <em>org.apache.fop.fo.FOTreeBuilder</em> is responsible for
actually constructing the FO tree. The key SAX events used are </p>
<p><code>startElement()</code>,</p>
<p><code>endElement()</code> and <code>characters()</code>.</p>
<p>All formatting objects derive from abstract class
<em>org.apache.fop.fo.FONode</em>. The other FO classes inherit from
<em>FONode</em> as follows:</p>
</s2>
<s2 title="Rendering">
<p>
This is a separate process. The <code>render()</code> method in
<em>Driver</em> is invoked (say,
by <em>CommandLine</em>) with the laid-out <em>AreaTree</em> and a
<em>PrintWriter</em> as arguments.
This actually calls the <code>render()</code> method in a specific implementation of
the <em>Renderer</em> interface, typically <em>PDFRenderer</em> or
<em>AWTRenderer</em>.
</p>
</s2>
</s1>
</body>
</document>
|