The Apache FOP Project

The Apache™ FOP Project

Apache™ FOP Design: Embedding Apache™ FOP in Other Applications

Introduction

This is the design for the external interface when Apache™ FOP is to be embedded inside another java application.

Common places where FOP is embedded is in a report production application of a server side application such as Cocoon.

Settings

User Agent

Possible meanings for a user agent:

The user agent is responsible for supplying user or context specific information. The list of user agent values can be found on the User Agent page.

Logging

XML input

general options

Rendering Options

for the PS renderer (eventually):

Render Results

Generate Output statistics from FOP:

Setting Up

The Driver handles the XML input. The user agent information is through the FOUserAgent. Handle logging through the user agent. Options could also be handled through the user agent, using mime type selection for renderer options.

Others

Render to more than one renderer at once (maybe not from the command line). For example you could generate a PDF for the archive and the PS for the printer in one run. It would probably be faster than converting the PDF to PostScript afterwards. Make the fo tree reuseable. If the fonts are the same then use the same area tree to output to different renderers.

Several code pieces for resolving URLs and/or file locations are scattered all over FOP and Batik. These should be replaced with an URIResolver invocation to unify behaviour and remove redundancies.