Home Page FOP Server - XML to PDF conversion
Home
XSL-FO Server
Getting started
How to
XSL-FO Editor
XSL-FO resources
XSL-FO in REALbasic
XSL-FO in Php
XSL-FO in VB 6
XSL-FO in .NET
XSL-FO in Ruby
XSL-FO in Delphi
Usage with APEX
Getting started

Whether you are new to Java, an experienced developer or are not using Java at all but you need to have a FOP server in a few minutes up and running we have created the J4L FOP Server bundle.

The J4L FOP Server bundle is a windows executable program that will install all you need to run Apache FOP and convert XML files to PDF. The main features are:

  • It is free
  • One click install and uninstall
  • No Java or Apache FOP knowledge required
  • It can be used from any programming language
  • It can be used for testing your xsl-fo very easily (see step 4 below)

Getting Apache FOP to work in 4 steps

1. The installation

Download this file and execute it.

2. Starting and stopping FOP

Use the Start server and Stop Server programs in the windows menu:

3. The initial test

After you have started the server open this URL in your computer and click the Convert to PDF button. This will generate a PDF file!

http://localhost:8087/J4LFOPServer/Example.html

4. Convert your own files

If you have your own XML and XSL-FO files you want to test, open this URL 

http://localhost:8087/J4LFOPServer/FOP.html

and upload the 2 files, you will find some examples in the directory FODesigner\examples\employees. You can select the files departmentEmployees.fo and  departmentEmployees.xml

press convert and you will see the output.

 

How to use the servlet at runtime

If you want to call the FOP Server from your own programs, the URL to use is:

http://computername:8087/J4LFOPServer/servlet?TEMPLATE=xslfo_filename

where:

  • xslfo_filename is the name the XSL-FO file which must be located in the directory: <install dir >\webapps\J4LFOPServer\WEB-INF\classes
  • you must call this URL using the HTTP POST method
  • in the Body of the HTTP request you must send the XML data
  • the response to the HTTP request will be the PDF file.

Note for Oracle APEX users. If you use Oracle APEX the URL to use as print server is:

http://computername:8087/J4LFOPServer/Apex

the three APEX parameters will be:

  • Printer server host address: computername (for example, "localhost" if APEX and FOP server are on the same computer)
  • Print server port: 8087
  • Print Server script:  /J4LFOPServer/Apex