FOP: Formatting Object to PDF Translator (James Tauber)
May 24, 1999
FOP (Formatting Object to PDF Translator)
"is the world's first (and still, I believe, only) formatter driven by XSL formatting objects.
It is a Java application that reads an XML document representing formatting objects
(eg the output of [James Clark's] XT)
and then turns it into a PDF document."
FOP requires XP from James Clark,
which in turn requires David Megginson's SAX.
XSL formatters like FOP not
only interpret the semantics of XSL formatting objects but deal with such issues as line breaking and page
breaking. FOP has a modular design allowing for extensibility in the formatting objects it supports as well as
the formatting algorithms used.
FOP was originally written in perl, then converted to
Python
for a number of versions, and then by leveraging
JPython, development was switched to Java.
[Thanks to Lars Marius Garshol for a correction here. - KS]
(JPython permitted replacing one class at a time in the move to Java.)
FOP includes the com.jtauber.pdf Java package.
The name FOP derives from the term for a man who is excessively concerned with appearance and style.
The current release differentiates between areas and spaces on a page,
for example, line-area vs. display-space, and inline-area vs. inline-space.
Flow objects (or formatting objects) from XSL
are more abstract than CSS concepts, for
example, page-masters and regions that can be used for different left and right page formats.
XT is used to produce XML with FO. FOP adds FO with fully computed properties (replacing the XSL default
values), areas, spaces, and PDF support.
Future releases of FOP will add
- better flow object support (i.e., lists and rules)
- better property support (color, border, bg, etc.)
- better interfaces with DOM and generic SAX parser
- better layout (columns, hyphenation, etc.)
FOP can be used with XHTML
as a better way to print web pages.
Eventually, one could import SVG diagrams and have FOP display or print them.
On a related note, see the March 1999 announcement of a
XSL FO contest sponsored by Sun and Adobe.
Jon Bosak believes that their combination of XML/XSL/Java/FOP could replace typical desktop publishing.
Note that Adobe's Acrobat Reader
handles pixels on a screen as well as ink on a page.
[At the time of this writing, this talk has not yet been made available online.]
XMLNews (David Megginson)
WWWhat Happened at WWW8?
Other Interesting Presentations
|