This example shows how to convert Java classes to a PDF document. The Java classes to be converted represent a Purchase Order document, the main file is:

com/java4less/examples/po/PurchaseOrderHeader.java

In this way you can use FOP as a reporting tool in your Java applications by converting your business objects to PDF.

To run this example you need JDK 1.5 (with the JAXB library) or JDk 1.6

Content of the directory:
1- generateSchema.bat. this file has been used to generate the file schema1.xsd.
2- schema1.xsd: this schema file can be loaded in the FOP Designer for creating the FO template
3- JavaPurchaseOrder.xrp: template to be edited using FO Designer
4- JavaPOExamples.xml: test data file to be used in FO Designer for testing
5- JavaPOExample.fo: FO generated by FO Designer. This will will be used at runtime for converting Java objects to PDF.
6- POTest.java: sample application that creates a PDF document from a Java Purchase Order object.
7- POTest.bat: file for running sample application