Hi,

Here are some ideas about how we could do the configuration for FOP.
Comments are welcome.

Use this class and various supporting classs (already in avalon
framework jar):
org.apache.avalon.framework.configuration.Configuration

>From a brief look at how this works it should be quite easy to use. We
just need to decide on an appropriate xml structure. I have attached an
example.

This can be used either with an xml file on the command line or through
embedding, eg. cocoon could pass a fop configuration class.
If the classes are not configured then default values are used.

Configurable classes:

- Driver
Passes configuration to user agent if not already set and to renderers.

- All renderers (ie. Renderer, StructureHandler implements)
This is so that the renderer can get its own specific information.
The PDFRenderer could have font setup, stream filters etc.

- Configurable FOUserAgent (have default FOUserAgent that can be
used/extended without config)
To make it possible to setup all the various options like dpi.


----------

The logkit Logger can be configured using this but it is not
appropriate. If FOP is run from the command line then it should do what
it already does and when embedding it would setup its own logger.

The image cache and other cache are similar. These can be set with a
static method and through the driver respectively.


Keiron.
<?xml version="1.0"?>

<fop version="1.0">

<base url="./"/>

<!-- Information for specific renderers -->
<!-- Uses renderer class name for unknwon renderers -->
<renderers>
<renderer class="org.apache.fop.render.pdf.PDFRenderer">
  <filterList>
      <!-- provides compression using zlib flate (default is on)-->
      <value>flate</value>

      <!-- encodes binary data into printable ascii characters (default off)
           This provides about a 4:5 expansion of data size -->
      <value>ascii-85</value>

      <!-- encodes binary data with hex representation (default off)
           This filter is not recommended as it doubles the data size -->
      <!-- <value>ascii-hex</value> -->
  </filterList>

<fonts>
 <font metrics-file="arial.xml" kerning="yes" embed-file="arial.ttf">
    <font-triplet name="Arial" style="normal" weight="normal"/>
    <font-triplet name="ArialMT" style="normal" weight="normal"/>
 </font>
 <font metrics-file="arialb.xml" kerning="yes" embed-file="arialb.ttf">
    <font-triplet name="Arial" style="normal" weight="bold"/>
    <font-triplet name="ArialMT" style="normal" weight="bold"/>
 </font>
</fonts>
<xmlHandler mime="text/svg+xml">
</xmlHandler>
</renderer>
<renderer class="org.apache.fop.render.ps.PSRenderer">
<xmlHandler mime="image/svg+xml">
</xmlHandler>
</renderer>
<renderer class="org.apache.fop.render.pcl.PCLRenderer">

</renderer>
<renderer class="org.apache.fop.mif.MIFHandler">

</renderer>
<renderer class="org.apache.fop.render.svg.SVGRenderer">
<format type="paginated"/>
<link value="true"/>
<strokeText value="false"/>
</renderer>
<renderer class="org.apache.fop.render.awt.AWTRenderer">

</renderer>
<renderer class="org.apache.fop.render.xml.XMLRenderer">

</renderer>
<renderer class="org.apache.fop.rtf.RTFHandler">

</renderer>
<renderer class="org.apache.fop.render.txt.TXTRenderer">
<pageSize columns="80"/>
</renderer>
</renderers>

<fop>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to