Architecture

| FOP Mechanics |
| Introduction |
The overall process is controlled by org.apache.fop.apps.Driver. This class handles the FO Tree building, renderers, output and logging. 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.
| Formatting Object Tree |
The class org.apache.fop.fo.FOTreeBuilder is responsible for actually constructing the FO tree. The key SAX events used are `startElement()`, `endElement()` and `characters()`. All formatting objects derive from abstract class org.apache.fop.fo.FONode. The other FO classes inherit from FONode as follows:
| Rendering |
This is a separate process. The `render()` method in Driver is invoked (say, by CommandLine) with the laid-out AreaTree and a PrintWriter as arguments. This actually calls the `render()` method in a specific implementation of the Renderer interface, typically PDFRenderer or AWTRenderer.

Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.