Home Page FO Designer 2.16. XSL-FO Editor for Apache FOP and Oracle APEX
                                FO Designer
                              • Introduction
                              • Documentation
                              • User guide online
                              • Teamwork
                              • Videos
                              • Version history
                              • PDF interactive forms
                              • Oracle Application Express
                              • APEX Plugin
                              • SAP XI / PI
                              • Oracle BPEL
                              • Mule ESB
                              • Apache Cocoon
                              • License
                              • Apache Cocoon

                                How to use FO Designer with Apache Cocoon


                                Apache Cocoon is a web development framework which includes a component for XML to PDF conversion. This is achieved by using the so called "PDF serializer". This requires you to create a XSL-FO file which describes how to convert the XML file to PDF. 

                                XSL-FO files created using J4L FO Designer are fully compatible and can be used in Apache Cocoon PDF serializer.


                                You can very easily test some of the examples provided with J4L FO designer in your Apache Cocoon server. For this example we assume you have installed Cocoon on a tomcat server in the following subdirectory:


                                We will create a very simple Cocoon application that converts the file examples\employees\departmentEmployees.xml to PDF. 

                                You must perform the following steps:

                                1. create a directory called 


                                2. copy these files from the FO designer distribution  to the c:\tomcat\webapps\cocoon\pdfsample directory:


                                3. create the file c:\tomcat\webapps\cocoon\pdfsample\sitemap.xmap. This file should contain the following data:

                                  <map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


                                  <map:match pattern="employeesPDF">
                                  <map:generate src="departmentEmployees.xml" type="file"/>
                                  <map:transform src="departmentEmployees.fo" type="xslt"/>
                                  <map:serialize type="fo2pdf"/>



                                4. Start the web server (Tomcat)

                                5. Open the following URL in the browser (we assume your server runs on port 8080):


                                6. The browser shows the PDF file.

                                As you can seen in this example, the file departmentEmployees.fo which has been designed with J4L FO Designer has been successfully been executed by Apache Cocoon.