The features described in this section are available only on the
premium inhouse Server or the cloud server.
In the preferences windows you can select the „J4L Premium or
In the case of the cloud server it can be used both at design
time from the designer and at runtime from Oracle Apex using the
URL below for test purposes. For production purposes however you
will receive a separate URL if you have contracted the service.
Note you need to select the correct server type
before exporting the XSL-FO file since for the use of the
Cloud server the XSL-FO file will contain a reference to your FO
Designer license. This will be used to authenticate your requests.
Sending the PDF per email
One of the capabilities of the premium and cloud servers is
that they can send the report files per email. This feature can
also be tested without the server.
First you need to set up the mail server in the windows
preferences. This is for example the setup for a hotmail account
(of course use your account instead of firstname.lastname@example.org)
Second you can test it with our
example LetterMail.xre. In the properties of the report,
the „Send mail“ flag has been selected. Make sure you add also the
Mail to: this is the recipient, it will commonly be
an XPATH to a node in the XML file. In this example
Att. Name: this is the attachment name (PDF). It can
be a constant name or you can combine it with data from the
XML file. For example you could have:
this would create LetterSmith.pdf as attachment
Subject: The subject of the email
Body: The body of the email. In these fields you can
use %1 to %5. These place holders will be replaced by the
Xpath variales 1 to 5. In this example we set the product name
in the subject of the email.
The result of executing the report
using the PDF button should an email as below:
This will work in the same in the
server side since the generated XSL-FO will contain the required
service metadata (see below) which will be used by the server to
send the email.
You can protect (encrypt) your PDF files to prevent
unauthorized use. This is useful for protecting sensitive data as
for example price lists.
Ask the end user to enter a password to open a file
or avoid printing the PDF
or avoid copy/paste or editing of data
This is how you setup PDF protection. In the Report properties
> Protect tab you can define protection level. The
Protect PDF: Yes/No.
Owner password: this is is the master password which
would allow you to change the permissions if your PDF reader
has such functionality. It can be a constant value of a Xpath
to the XML document.
Open PDF password: this is the password required to
open the document. You would give this password to the
intended document recipients.
Protect printing: disables PDF printing.
Protect copying/editing: disables copy/paste and
Note this functionality is available in the Premium or Cloud
FOP servers only.
Creation of Excel files
The Inhouse Premium Server and the J4L Cloud FOP server can
create Excel (xlsx) files for your reports. The Excel
files will include:
font size, style and color
cell background color
overall design of the page
images (each image must fit in one cell)
For Excel files you will however not get the same what you see is
what you get result as for PDF.
Note in order to get the best results in Excel you have to use row
and column markers since these will be used to create the rows and
cells in the excel file. Ideally you should create separate
templates specific for Excel.
Objects as Memo fields, boxes, charts or barcodes are not
supported in the Excel output.
There two ways of creating the Excel output outside the designer:
Flag the report as "Excel only" in the report's properties
this will generate an XSL-FO file (see code below) which later
will be recognized as "Excel output only" by the J4L FOP
Server. In this case no PDF output is possible for this
If you need to use the same report for PDF and Excel output,
the other option is adding ?XLS=1 to the Server URL to enable
the Excel output. For example