1

Does anybody know if there are some example xsl-fo files out there on the net which show how to use the tags that the AFP output engine adds to Apache FOP?

This page http://afp-renderer.sourceforge.net/afp-extensions.html does a good enough job of listing what the extra extension tags are, but I have no idea where they fit in the existing schema of xsl-fo tags.

Roboprog
  • 3,054
  • 2
  • 28
  • 27

1 Answers1

1

The page you mentioned is quite old. Better look inside the Apache FOP project where this has been integrated. Check the AFP extension section of http://xmlgraphics.apache.org/fop/trunk/output.html

The examples in there are almost complete but here is a small XSL:FO input:

<?xml version="1.0" encoding="UTF-8"?>
<fo:root
    xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    >
<fo:layout-master-set>
    <fo:simple-page-master master-name="Front" page-height="297mm" page-width="210mm"
                           margin-top="1mm" margin-bottom="1mm" margin-right="1mm"
                           margin-left="1mm">
        <fo:region-body region-name="Body_front"/>
    </fo:simple-page-master>
</fo:layout-master-set>

<fo:declarations>
    <afp:include-form-map name="F1IDOCS1" src="file:src/test/data/afp/resources/F1IDOCS1.FDF"/>
</fo:declarations>

<fo:page-sequence master-reference="Front">
    <afp:invoke-medium-map name="DEFS"/>
    <fo:flow flow-name="Body_front">
<fo:block-container>
<fo:block font-family="Arial" font-size="12pt">Hello World !</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
Alex Giotis
  • 611
  • 7
  • 11
  • Thanks for the update. I don't suppose you have seen anything that also emits "TLE"s or "NOP"s? (out of band / unprinted indexing information) – Roboprog Mar 23 '13 at 02:49
  • OK, having done a quick "RTFM", I see there is a TLE section: http://xmlgraphics.apache.org/fop/trunk/output.html#afp-tag-logical-element – Roboprog Mar 23 '13 at 02:50