Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 920

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Task
Populate a PDF form with XML data
Prefill individual fields in a PDF form with data from a data
source
Determine the structure of a PDF form
Embed an interactive PDF form within a PDF document
Write a PDF form directly to the browser
Write PDF form output to an XML file
Print a PDF form from ColdFusion
Extract data from a PDF form submission
Write data extracted from a PDF form submission to a PDF
file
Write data in a form generated in LiveCycle to an XDP file
Extract data from an HTTP post submission
Flatten forms generated in Acrobat (not used forms
generated in LiveCycle)
Merge forms generated in Acrobat or LiveCycle with other
PDF documents
Populating a PDF form with XML data
Some applications submit PDF form data in an XML data file. For example, the e-mail submit option in forms created
in LiveCycle generates an XML data file and delivers it as an attachment to the specified e-mail address. This technique
is an efficient way to transmit and archive data because XML data files are smaller than PDF files. However, XML files
are not user-friendly: to view the file in its original format, the user has to open the PDF form template in Acrobat and
import the XML data file.
ColdFusion automates the process of reuniting XML data with the PDF form that generated it. To reunite them, you
use the
action of the
populate
specify the XML data file that contains the information submitted by the person who completed the form. You also
have the option to save the result to a new file, which lets you save the completed forms in their original format (and
not just the form data). In the following example, ColdFusion populates the payslipTemplate.pdf form with data from
the formdata.xml data file and writes the form to a new PDF file called employeeid123.pdf:
<cfpdfform source="c:\payslipTemplate.pdf" destination="c:\empPayslips\employeeid123.pdf"
action="populate" XMLdata="c:\formdata.xml"/>
For forms created in LiveCycle, you have the option to write the output to an XML Data Package (XDP) file rather than
a PDF file. For more information, see
Note: If you do not specify a destination, the
Tags and actions
action of the cfpdf tag
populate
populate
action of the cfpdfform tag with the
cfpdfparam
action of the
read
populate
action of the
Note: The
cfpdfform
cfdocumentsection
action of the
populate
specified
read
action of the
cfprint tag
source="#PDF.Content#"
source="#PDF.Content#"
and the
destination
source="#PDF.Content#"
and an XDP extension for the output file
cfdump
tag determines the structure of the form data; map the form fields to the
output fields
cfpdf
For more information, see
cfpdf action="merge"
For more information, see
tag, specify the source, which is the PDF form used as a template, and
cfpdfform
"Writing LiveCycle form output to an XDP
action displays the populated PDF form in a browser window.
populate
Last updated 1/20/2012
cfpdfsubform
tags
tag with the
cfpdfform
cfdump
cfpdfform
tag within the
tag must be at the same level as the
tags, not contained within them.
tag with the
cfpdfform
cfpdfform
tag
for the
action of the
read
for the
populate
attribute
for the
populate
"Flattening forms created in
"Merging PDF
documents" on page 939.
file" on page 920.
and
tag
cfdocument
tag.
attribute not
destination
tag
cfpdfform
action of the
cfpdfform
tag,
action of the
tag,
cfpdfform
Acrobat" on page 941.
915

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents