XSL-FO Designer for Apache FOP


3. Working with the user interface

This section highlights some common operations performed while developing a template:

Creating, deleting, importing and exporting

In the File menu you can find all the operations to be performed on projects, these are:

  1. Create a new project. Use the „New..“ item.  Select new FO Report Project and follow the steps in the wizard.

    Enter a project name and press finish

  2. Deleting a project: press DEL on the project folder, make sure you select the „Delete project contents on disk“ checkbox

  3. Importing a report. Use this to import single report files. A new project will be created using the file name.

  4. Import a legacy report. These are .xrp files used in FO Designer 1.*. Same as above but using legacy files instead.
  5. Save reports to the file system
  6. Export and import complete projects (including XML and schema files).

    Select export and File system. If you select „Archive File“ the project will be exported to a zip file.

    Last, select the objects to be exported and press finish:

Selecting objects

Objects in the areas can be selected in 3 ways:

  • Single object selection: clicking on the object (the properties of the object will be shown automatically
  • Multiple object selection: click on several objects while holding the SHIFT key pressed.

The selected object can then be resized or moved all together using the mouse.

Operations on files

You may use the context menu to delete, copy or rename files or whole projects however make sure that:

  • If you copy a whole project make sure you rename the xre to the same name as the project name.
    Basically make sure the xre file has always the same name as the project.
  • You many have only one xre file per project. If you need to copy the xre file, copy the whole project instead.

Operations on objects

There are other operations you can perform on the selected object by using the context menu (mouse‘s right click)

The operations are not explained here in detail since they are self-explanatory and quite standard in many windows programs. Additionally to the operations listed the following operations can be performed by using the keyboard:

  • copy: control key + C
  • cut: control key + X
  • paste: control key + V
  • delete: <del> key

Operations on areas

The areas item in the main menu allows the following operations:

Both operations work using the Outline view.

  • Inserting an first level area: select the master on the outline view. The new area will be added as first level area.

  • Inserting an area below an existing area: select the parent area in the outline, for example „Detail“

    the new area will be added below (as a subarea). In this example „Detail area 3“ has been added below „Detail“

The preferences dialog

In the windows menu there are 3 items (4 if you install the SVN plugin):

  • the reset perspective will replace all the view in the original position. This is useful if you have closed or moved some views by mistake and want to return to the original window layout.
  • The Designer perspective will open the editor in case the Welcome or SVN setup perspectives are open.
  • Preferences: in this dialog the settings described below are available

The settings are:

  • Properties windows on left side: this is useful if you are working with small screens (laptop). In this case the properties of the object will be shown on the same position as the project explorer (as a new tab), saving therefore display space.
  • Align to grid: align always new or moved object to the grid
  • Grid: normal or fine
  • XML namespace processing setup. remove namespaces from  test XML files before creating the PDF.
  • Escape invalid characters: this should always selected in order to generate valid xsl-fo files.
  • Oracle APEX encoding setup: select this option if you are working with Oracle APEX. Do not use however this option for the Oracle APEX Listener (ORDS) as print server.
  • Activate digital signature. See section below.
  • Local history page, Limit history size: set a limit on the number of past reports (history) to be kept.
  • Local history page, Days to keep files:  older copies will be deleted.
  • Local history page, Maximum entries per file:  maximum number of past reports to be kept.
  • Local history page, Maximum file size:  larger reports will not be kept.
  • Mail page, Smtp Host and port (In the Mail subpage): Setup for sending the PDF reports from the designer (see cloud server section)
  • Mail page, From email: sender email
  • Mail page, User and password: smtp server login data
  • Server page, DB Server and DB Server port:(in the Server subpage) this setup is required when working in teams and there is a central J4L FOP Server together with a central database.
  • Server page, Printer server type:(in the Server subpage) setup for remote  PDF generation. Select one of the supported servers.
  • Server page, Printer server URL: use
    for Oracle Apex: http://host:port/ords/_/fop2pdf or http://host:port/apex/_/fop2pdf
    for local J4L FOP Server user: http://host:port/J4LFOPServer/Apex
    for J4L Could Server use:  https://apex-reports/print/trial

    Note: for Apex ORDS to work you need to navigate to the /apex or /ords directory , locate the defaults.xml file and add the following code:

    <entry key="misc.enableOldFOP">true</entry>

  • Server page, Connection timeout (secs): timeout when connecting to remote servers for FOP generation
  • Server page, Response timeout (secs): timeout for the response from the remote FOP server.
  • Server page, Ask before using the cloud server for PDF:  self-explaining
  • Server page, Ask before using the cloud server for Excel: self-explaining

The local history

The designer will keep a copy of the previous report each time your click on the save button. The settings in the preferences dialog will determine how many and how long the copies will be kept.

In order to recover a previous version of the report, first close the report then select the „Show local history“ in the context menu.

The local history window will open. You can use the context menu „Get Contentsto recover a previous version (make it the current version) and replace the current one.

After getting a previous version you can open the report as usual, you will be now working with a copy of a past version.

The report assistant

The report assistant is a report creation wizard that will take you through the steps of creating the skeleton of the report. By skeleton we mean:

  • You can set the basic style and layout of the areas
  • you can define some out-of-the-box master/detail relationships
  • you can define up to three areas

What you need to do after the skeleton has been created include (but not only) items as below:
  • add report titles
  • move/resize the fields to the desired size or position
  • change the style of specific fields
  • add borders , lines, images or barcodes for example

Look at the 2 videos below for a quick introduction

  • A master/detail structured XML file

    Watch it in Youtube here.

  • A master/detail XML file as generated by Oracle APEX (multiquery)

    Watch it in Youtube here.