Specification Request

I programmed multilevel outlines, form fields, Javascripts with the PDF
classes of Fop-0.20.1. These experiments, attacking from the back end, lead
to these conclusions:

1. PDF Extensions can be added to the PDF classes on a clean way. The trick
is when/where to insert PDF objects to avoid troubles with reference

2. Extension Types

Definition "position": the page and page coordinates of a rendered element.

2.1 Element text/attributes only

        example: startup JavaScript

                <fox:startupScript file="startup.js"/>

2.2 Element text/attributes + position of parent element

        example: outlines

                <fo:block>This is a heading level 1
                  <fox:outline level="1">Go and see heading level 1</fox:outline>

2.3 Element text/attributes + position of parent element + reserved
rectangle coordinates

        example: form fields

                  <fox:form file="f9viewer.form" width="30mm" height="10mm"/>

                (Implemented with external files, which in turn pull in further exteral
JavaScript files in my implementation).

2.4/5/6 corresponding to 2.1/2/3 but a reference to a subtree in xsl:fo
input instead of just text/attributes of a single element.

        example: fancier form fields in XML

                  <fox:formField type="button" width="30mm" height="10mm">
                          some Javascript
                          some PDF stuff

So FOP has to do depending on the extension type:
- get a position
- format/reserve the reqested page space
- setup arguments
- transfer control into the code of the PDFRenderer with the arguments. The
addressing of methods has to be specified. New methods have to be added, so
that existing methods are not modified. The code has to be executed while
method "renderPage" is working. Lots of things happen in FOP in a different
sequence from the xsl:fo XML sequence.

A few general interfaces enable powerful PDF extensions - in the first
approach perhaps with rather crude input representations like native PDF
syntax. Organization of XML, XSL, other components and procedures are anyway
the key to success. That's what I learnt from development of a multilingual

Next: math and chemical formulas, embedding EPS - you name it?

Hansuli Anderegg

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

Reply via email to