Starting with version 1.5 you can create PDF forms using J4L FO
Designer (Suite edition), however this requires that you use our
FOP server since the generation of PDF forms is not part of the XSL-FO
You will find an introduction to the usage of and motivations for
PDF forms at this page in our site.
Note the generation of forms requires the suite or enterprise
license and the use of J4L FOP Server.
The highlighted objects in the toolbar can be used for data
Text fields.This object is also used in non-form
PDF files to display data.
Combo boxes. This object is also used in non-form
PDF files to display data.
Checkbox. This object can be used in forms only.
Button (to submit or reset a form). This object can be used in
Text fields and combo boxes are normally used to display
data. In order to activate them for data entry the "Input
field" property must be set to yes.
Input fields have a green border in the designer.
Text fields can be used to allow free entry of data. The
following properties are available for these kind of input
Read only: It is possible to set the field to read only,
this is useful to prefill fields which you later can read when
the user has submitted the PDF form. The read only field can
contain a user id which you would use to identity the form.
Is hidden field. If true the field will not be displayed in
the PDF reader but the field is still contained in the PDF
Mandatory: the field must contain a value
Multiline: several lines of text can be entered in the
Max length: maximum number of characters that can be entered
The default value of the text field will be the constant one
(see value property) or the one returned by the Xpath.
This kind of fields offer a list of values the user can select.
They behave in a similar way as text fields.
Checkboxes are input fields which can only contain the value
true or false (selected or not selected).
Button objects are used to execute actions. The actions
available at this time are:
reset form to the default values.
submit form. In this case you have to enter the url
in the "Submit to URL" field. This can be:
The submit URL value can also be filled dynamically from
the XML data using the Xpath.
The submission format, HTML, XML or PDF
Filling in the form
There are several ways to submit the forms:
submitting to a web server (as PDF, HTML or XML)
email (as PDF or XML)
printing and sending paper
sending the filled PDF file by any other means
The option (4 or partly 2) that requires you to save the
filled form to a PDF file has a potential issue. If you use
Adobe Reader you will get an error like this one "You cannot
saved data typed into this form".
The reason for this is, Adobe Reader allows saving filled
forms only if the forms has been created and digitally signed
by Adobe tools. At this point you have some options:
Buy Adobe LiveCycle reader extensions server which
will add the signature to the form.
Use Adobe standard to fill in the form
(instead of the free adobe reader)
or use another reader.
there are several free PDF readers that will allow you to fill
and save forms. One of them is Nitro PDF Reader
The PDF form can be submitted in several ways:
to a web server using HTTP
or saving the filled form to a PDF file and submitting by
any other means.
There are several formats which can be used to receive the form
·HTML, the data will be submitted to your web server
(the URL you have specified) using the HTTP POST method. The
body on the HTTP request will be something like this:
XML. The format of the data when submitted using XML is:
PDF. Submitting in PDF format requires you to have a reader
that allows you to do that (see previous section), it has the
advantage that the user can keep a copy of the same file she
has submitted. The receiver of the submitted PDF can also
display the received data in a user friendly way.
In order for your application to extract the content of the
submitted PDF you have 2 options:
Use our servlet which converts PDF to XML. The file J4LFOPServer.war
file contains a servlet, once this file has been
deployed to a web server you can reach our servlet in this
The order_form.xre example shows how the input fields
can be used. The example contains one input field of each type,
furthermore it shows how fields can be repeated in the detail
The example contains no submit button since it assumes the user
will fill the form with a PDF reader that can save forms (see
the Filling forms section) and submit the saved PDF by email.
This example is an order form which:
Contains a read only field (customer number) which can be
used as key for identifying the customer.
The address and city fields are prefilled with the customer
data but the customer can change the delivery address by
modifying the fields.
·Contains a list of items the customer can order by
just entering the quantity at selecting the color.
There is a multiline comments field at the bottom.
the screenshot shows how the PDF form has been filled and can
be saved using Nitro PDF Reader:
As last step the filled forms has been received by the
selling company and the values of the PDF can be extracted
(see section Form submission). We include a simple HTML page
inside J4LFOPServer.war which calls our form