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
                              • Mule ESB

                                How to use a PDF transformer (Apache FOP)  for Mule ESB 3.2



                                The PDF transformer for Mule ESB uses Apache FOP for converting XML files to PDF using XSL-FO. We have created a package that contains all you need. You are free to use the transformer, only the J4L extensions require a specific license.


                                This documentation, examples and component have been written and tested with Mule ESB 3.2

                                How to run a simple test, step by step

                                We assume you are using Eclipse based Mule IDE, if that is not your case, you can install is as described here.

                                You proceed like this:

                                1. In eclipse  select File -> new -> project ...  and select Mule Project
                                2. Enter the data like this

                                3. click finish and the project will be created

                                4. create a "conf" folder, download this mule-config.xml and place it there

                                5. now download this file which contains all required third party libraries. Unzip the file and place them somewhere on your computer
                                6. click on your project and select properties from the context menu, and use the "Add external JARs.." button to add all the Jars you have just downloaded

                                Now you are ready to test the XML to PDF conversion The mule-config.xml file you have downloaded will expect the following directories to exists so proceed like this

                                1. create c:\tmp\input
                                2. create c:\tmp\output
                                3. download the file departmentEmployees.fo and copy it to c:\tmp
                                4. download the file departmentEmployees.xml and copy it to c:\tmp\input

                                Now you start your project, right click on mule-config.xml and select:

                                Now you should see the input file from c:\tmp\input being moved to c:\tmp\output as a PDF file.


                                J4L Extensions

                                The additional features provided by J4L are:

                                • Barcodes and charts. The usage as described here does not change, barcodes and charts can be added to the XSL-FO file using the J4L FO Designer.
                                • PDF interactive forms. The usage as described here does not change, form fields can be added to the XSL-FO file using the J4L FO Designer.
                                • Adding digital signatures to PDF files. For this feature you have to provide the following additional properties in the customer transform: P12File, P12Psw and Signature. The P12 file contains the certificate and private key used for the signature, the P12Psw is the password for the p12 file and the Signature property must be set to "true". This is an example:

                                  <custom-transformer name="XMLToPDF" class="com.java4less.mule.FOPTransformer">

                                  <spring:property name="templateFile" value="c:/tmp/departmentEmployees.fo"/>

                                  <spring:property name="P12File" value="Jon.p12"/>

                                  <spring:property name="P12Psw" value="test"/>

                                  <spring:property name="Signature" value="true"/>