This Quick Start describes how to use the Forms to render
an interactive PDF form with pre-filled data. For more information
about the Forms service, see
LiveCycle ES2.5 Services
.
Using the Forms service, a form design can be merged with XML
data, and rendered as a pre-filled, interactive PDF form. For example,
users log in to a web-based system and open an interactive purchase
form using Adobe Acrobat version 8.0 or later. The form is pre-filled
with shipping, contact, and purchase order information. Users fill
in the remaining purchase order details and save the PDF form.
An application, named
poPDFApp
, implements this service
for the organization. The form design, named
purchaseOrder.xdp
,
is available as part of the application. An XML file, which contains
the shipping, contact, and purchase order information, is merged
with the form design to render the interactive PDF form. The resulting
PDF form is saved to the network location specified by the user,
such as
\\user1\POForm.pdf
. Users retrieve the PDF form from
the network location, fill, save, and send it electronically.
The following assets are in the poPDFApp application:
-
A form design named
purchaseOrder.xdp
that is
used to render the PDF form. Form designs are created using Designer
. (See
LiveCycle Designer ES2 Help
.)
-
A process, named
createPOForm,
that includes the following
items:
-
An input
document
variable,
named
poShipXML
, that stores the XML data with shipping,
contact, and purchase order information.
-
An input
string
variable, named
savePOLocation
,
that stores the network location to save the purchase order form.
-
An output
document
variable, named
ouputPDF
,
that stores the interactive PDF form.
-
A renderPDFForm operation (Forms service) that merges a form
design with an XML file and renders an interactive PDF form. The
resulting output is a
document
value that represents
the PDF document.
-
A Write Document operation (File Utilities service) that
saves the
document
value to the file system.
The process diagram for the createPOForm process looks like the
following illustration:
The following XML document provides the shipping information
to pre-fill the rendered PDF form:
<?xml version="1.0" encoding="UTF-8"?>
<poform1>
<txtPONum>8745236985</txtPONum>
<dtmDate>2004-02-08</dtmDate>
<txtShipCompanyName>Fin@nce Incorporated</txtOrderedByCompanyName>
<txtShipAddress>123, Any Blvd.</txtOrderedByAddress>
<txtShipCity>Any City</txtOrderedByCity>
<txtShipStateProv>Any State</txtOrderedByStateProv>
<txtShipZipCode>12345</txtOrderedByZipCode>
<txtShipCountry>Any Country</txtOrderedByCountry>
<txtShipPhone>(123) 456-7890</txtOrderedByPhone>
<txtShipFax>(123) 456-7899</txtOrderedByFax>
<txtShipContactName>Akira Tanaka</txtOrderedByContactName>
</poform1>