Apache XML FOP

the Apache XML site
 
   

Examples

printer
print-friendly
version
Generated examples
Description XSL-FO file PDF result
default font characters fonts.fo fonts.fo.pdf

Examples in the distribution

Examples for the use of XSL-FO can be found in the FOP distribution in the subdirectory xml-fop/examples/fo. You can start transformation of all fo files into pdf files by starting xml-fop/examples/fo/runtests (only source distribution). The resulting test files can be found in xml-fop/examples/fo/tests

At the moment the following files are part of the distribution:

  • simple.fo - a very simple file which gives use a first impression of the structure of an XSL-FO file
  • normal.fo - a simple file showing the use of a 2 level of headings, normal text and a header.
  • table.fo - some table examples
  • list.fo - a short tutorial how to use list fo's and properties
  • images.fo - shows how to embed GIF and JPEG images into the XSL-FO file using external-graphic.
  • border.fo - a not so simple example how to use borders in tables
  • extensive.fo - a longer test file containing a lot of different flow objects and properties. A good candidate to test your bugfix or new FOP code.
  • leader.fo - shows different uses of fo:leader, p.e. as rule or in a table of content
  • normalex.fo - shows the use of computed property values
  • inhprop.fo - shows the use of inherited property values
  • instream.fo - shows the use of fo:instream-foreign-object together with SVG
  • textdeko.fo - shows the use of the property text-decoration
  • readme.fo - uses an old version of FOP documentation for a longer example
  • Look also into the directory examples/fo/svg. There you find some very extensive SVG examples.
  • In the directory examples/fo/pagination you find a suite of examples showing the use of XSL-FO pagination.

Developers will find the first steps to a test suite for all implemented formatting objects and properties in xml-fop/test/xml/.