Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 960

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
</Right>
</Footer>
</StyleProfile>
<StyleProfile name="FooterStyle">
<Footer>
<Left>
<StyledText>
<p font-size="9pt"><i>CFML Reference</i></p>
</StyledText>
</Left>
<Right>
<StyledText>
<p font-size="9pt">Page <_PageNumber/> of <_LastPageNumber/></p>
</StyledText>
</Right>
</Footer>
</StyleProfile>
</DDX>
The following code shows the ColdFusion page that processes the DDX instructions:
<cfif IsDDX("Book.ddx")>
<cfset inputStruct=StructNew()>
<cfset inputStruct.Doc0="Title.pdf">
<cfset inputStruct.Doc1="Chap1.pdf">
<cfset inputStruct.Doc2="Chap2.pdf">
<cfset inputStruct.Doc3="Chap3.pdf">
<cfset inputStruct.Doc4="Chap4.pdf">
<cfset outputStruct=StructNew()>
<cfset outputStruct.Out1="myBook.pdf">
<cfpdf action="processddx" ddxfile="book.ddx" inputfiles="#inputStruct#"
outputfiles="#outputStruct#" name="ddxVar">
<cfoutput>#ddxVar.Out1#</cfoutput>
</cfif>
Applying a watermark to a form created in Acrobat
The following example shows how to prefill an interactive Acrobat tax form and apply a text-string watermark to the
completed form that the user posted. Specifically, this example shows how to perform the following tasks:
• Use the
and
cfpdfform
cfpdfformparam
• Use the
tag to write the output of a PDF post submission to a file.
cfpdfform
• Use the
cfpdfprocessddx
Note: This example uses the cfdocexamples database and the 1040 and 1040ez Federal tax forms. A valid user name is
"cpeterson." To download the 1040 and 1040ez IRS tax forms used in this example, go to the IRS website. Open the forms
in Acrobat (not LiveCycle Designer) and add a submit button that points to the URL for the ColdFusion processing page.
Also, add a hidden field with a variable that contains a unique filename used for the completed tax form.
The first ColdFusion page creates a login form that prompts for the user name and Social Security Number:
tags to populate a form created in Acrobat.
action to apply a text-string watermark to the completed form.
Last updated 1/20/2012
955

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents