File Release Notes and Changelog
Release Name: 1.0.1
Notes:
AFP RENDERER RELEASE NOTES
===========================
In order to use the AFP Renderer please follow the instrauctions below:
1) The renderer uses the actual AFP (MODCA) font resources in order to determine the font metrics, therefore you must have access to the font files. Note that it is not possible to ship the renderer with these fonts as they are licenced by IBM (or thrid party font providers). The font files required depend on the fonts you are using, you will require the code page file and character set files. Please note that the renderer does not currently support outline fonts.
2) Define the fonts you are using in the afp-fonts.xml file an instance of this XML document may contain definitions for an arbitrary number of fonts that are available to the AFP renderer. Please see the example below which would require the following files to be available in the classpath under the installed-fonts path attribute "afp-font-resources":
T1V10285.CDP (code page file)
C0G21A00.240 (character set file)
C0G31A00.240 (character set file)
C0G41A00.240 (character set file)
C0G51A00.240 (character set file)
C0G21AB0.240 (character set file)
C0G31AB0.240 (character set file)
C0G41AB0.240 (character set file)
C0G51AB0.240 (character set file)
<installed-fonts path="afp-font-resources">
<afp-font id="any" codepage="T1V10285" encoding="Cp1146">
<pointsize id="10">
<characterset weight="normal" style="normal">C0G21A00</characterset/>
<characterset weight="normal" style="italic">C0G31A00</characterset/>
<characterset weight="bold" style="normal">C0G41A00</characterset/>
<characterset weight="bold" style="italic">C0G51A00</characterset/>
</pointsize>
<pointsize id="11">
<characterset weight="normal" style="normal">C0G21AA0</characterset/>
<characterset weight="normal" style="italic">C0G31AA0</characterset/>
<characterset weight="bold" style="normal">C0G41AA0</characterset/>
<characterset weight="bold" style="italic">C0G51AA0</characterset/>
</pointsize>
<pointsize id="12">
<characterset weight="normal" style="normal">C0G21AB0</characterset/>
<characterset weight="normal" style="italic">C0G31AB0</characterset/>
<characterset weight="bold" style="normal">C0G41AB0</characterset/>
<characterset weight="bold" style="italic">C0G51AB0</characterset/>
</pointsize>
</afp-font>
</installed-fonts>
3) You can download a free AFP viewer from:
http://www.barrsystems.com/product/afpviewer/default.asp
This viewer may also ship with some afp font resources so that you can use these for testing, you can also install your own fonts into it's resources and so use it as a complete test harness.
4) Using AFP Extensions
Extensions provide support for constructs that are not addressed by the XSL-FO standard. This provides a mechanism to render AFP specific tags into the resulting document.
AFP extensions use the "afp:" namespace identifier. To use any of the AFP extensions, add a namespace entry for http://org.apache.fop/extensions/afp to the root element:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:afp="http://org.apache.fop/extensions/afp">
Where the AFP extensions are placed within your formatted object is not important. The reason for this is that the extensions work by being associated with an "id" attribute of an fo element, for the AFP extensions to work, the "id" attribute on the extension must correspond to an "id" attribute on an fo element within the document. In other words, the "id" attribute actually creates the "view" within the AFP document.
Tag Logical Element
The Tag Logical Element (TLE) structured field supports the tagging of pages and page groups with an attribute that may be used as an index key. The TLE structured field can be embedded directly in a page or a page group. The TLE structured field does not provide any presentation specifications and therefore has no effect on the appearance of a document when it is presented.
An example of including a tag logical element in a page:
<afp:page id="PAG001">
<afp:tag-logical-element name="key" value="value"/>
</afp:page>
Then in the formatted object create a block element that will render on the page on which the TLE is to be included, the attribute "id" must correspond to the afp:page element:
<fo:block id="PAG001"/>
See Page Group below for an example of adding a TLE to a page group
Page Group
A page group is used in the data stream to define a named, logical grouping of sequential pages. Page groups are delimited by begin-end structured fields that carry the name of the page group. A page group can only be associated with the fo:page-sequence element. Typically a page group may be added to a document to support document indexing by adding a TLE element to the group. A TLE specifies object attribute information that can be used to support attribute-based document indexing and attribute-based document navigation.
An example of including a page group with a tag logical element:
<afp:page-group id="PGG001">
<afp:tag-logical-element name="key" value="value"/>
</afp:page-group>
Then on the fo:page-sequence you include the attribute "id" corresponding to the "id" of the afp:page-group
<fo:page-sequence id="PGG001" master-reference="Chapter1">
Include Page Overlay
Overlays are page resource objects that contain data objects and that define their own environment parameters. Include Page Overlays (IPO) may are included on the logical page presentation space using the IPO structured field. The IPO structured field references an overlay resource definition that is to be positioned on the page.
An example of including an include page overlay:
<afp:include-page-overlay id="IPO001" name="O1XXXXXX"/>
Then in the formatted object create a block element that will render on the page on which the overlay is to be include, the attribute "id" must correspond to the afp:include-page-overlay element:
<fo:block id="IPO001"/>
Include Page Segments
Page segments are resource objects that contain data objects. Page segments can be included on the logical page presentation space using the Include Page Segment (IPS) structured field, and inherit the environment parameters defined by the including page. The IPS specifies a reference point on the including page coordinate system that may be used to position objects contained in the page segment.
An example of including an include page overlay:
<afp:include-page-segment id="IPS001" name="XXXXXXXX"/>
Then in the formatted object create a block element that will render on the page on which the segment is to be include, the attribute "id" must correspond to the afp:include-page-segment element. Note that the position of the block element will be used to determine the co-ordinates of the IPS, therefore use the start-indent, space-before.optimum, width and height attributes to position the IPS correctly.
<fo:block id="IPS001"/>
Changes:
1) Support added for AFP Extensions (IPO, IPS, TLE)
2) Improved Exception Handling
3) Fixed DPI resoultion font problem.