This directory contains a number of static and dynamic examples, and both a
sample Servlet and a sample Application for converting XML to PDF.

The "samples" and "dynamic" directories contain the various XML examples -
static XML under "samples", and dynamic JSP based examples under "dynamic".
The dynamic examples will requires a Java Servlet/JSP engine to run.


The available static examples are:
----------------------------------
samples/HelloWorld.xml
	The simplest example you can make - prints "Hello, World!"
	
samples/Lists.xml
	A simple example showing some of the different options for drawing lists.

samples/Colors.xml
	Create a simple color table listing all the named colors that can be used
	by the Report Generator.

samples/NestedTables.xml
	An extremely simple example showing how tables can be nested and sized
	automatically based on their content.

samples/Graphs.xml
	Create a number of sample graphs, showing many of the different graph
	attributes.

samples/Giro.xml
	Create a "Giro" - a type of payment slip used in the UK. This example
	is based on an old British Telecom bill.

samples/MetaData.xml
	Shows how to embed XML metadata directly into the PDF document.

samples/PDFUserGuide.xml
	The XML source code for the documentation supplied with our companion
	product, the PDF library (which the Report Generator is built on).

samples/VectorGraphics.xml
	Some some examples of the vector graphics elements.

samples/userguide.xml
	The XML source code for the userguide for this product.


The available dynamic examples are:
-----------------------------------
dynamic/date.jsp
	Simple example printing todays date in the current locale

dynamic/bigtable.jsp
	Creates a large table spanning several pages, also demonstrating
	headers and footers.

dynamic/phonebill/
	A complex example showing the creation of a dynamic phone bill from a
	database. Includes the database schema and everything else required.
	The same example is online at:
	http://bfo.com/products/report/examples.jsp


To run the examples
-------------------
* Both UNIX and Windows users must set their CLASSPATH to include a SAX parser.

* UNIX users may then run the shell script "RUNME.sh", which will convert all
  the static examples.

* Windows users can run the batch file "RUNME.bat" which will do the same.

The dynamic examples (except for the phonebill, which has it's own
installation instructions) must be copied into your servlet engines document
root. From there you have two options for converting these JSP's to PDF
documents.

For those using a Servlet 2.2 engine, like Tomcat 3.x or JRun:


   Compile the "SampleServlet.java" file, and copy it into the
   "WEB-INF/classes" directory of your servlet engine. The javax.servlet
   classes will need to be in your CLASSPATH


For those using a Servlet 2.3 engine, like Resin 2.0.3 or Tomcat 4.x


   Edit the "WEB-INF/web.xml" file under your servlet engines document
   root, and add a block similar to the following block inside the "<webapp>"
   element. The <url-pattern> element should match the location of the sample
   JSPs.

    <filter>
      <filter-name>pdffilter</filter-name>
      <filter-class>org.faceless.report.PDFFilter</filter-class>
    </filter>
    <filter-mapping>
      <filter-name>pdffilter</filter-name>
      <url-pattern>/path/to/samples/*.jsp</url-pattern>
    </filter-mapping>


In addition, those using Caucho Resin 2.x must copy the "report-1.0.dtd" file
from the "docs" directory into the same location under the document root. This
is necessary due to a bug in Resin 2.0.4 and earlier.

