Archive for January 14th, 2008
cfform to generate dynamic PDF forms?
by Rolando on Jan.14, 2008, under ColdFusion
I’m trying to figure out if there’s a way to generate dynamic PDF forms with ColdFusion or anything at all and ran into this at CFFORM reference page for CF8:
| Incorporating interactive fields in PDF forms
ColdFusion 8 lets you use the cfform tag to create PDF forms that contain static and interactive form fields. The cfform tag must exist within a cfdocument tag (where format=”pdf”). Only one cfform tag can exist within a cfdocument tag. Completed forms can be posted to the server as an HTTP Post, or the entire PDF can be submitted as binary stream. If the PDF is submitted, you can use the cffile tag to save completed PDF form to a hard drive: <cffile action=”write” file=”c:\savedpdf.pdf” output=”#PDF.content#”> The output can be manipulated and extracted by using the tag. Only the following cfform attributes are supported in generating PDF forms:
To embed an existing PDF form generated by LiveCycle Designer or Acrobat, use the tag. |
Then they provide the following example which has some obvious errors:
A simple PDF form
<cfdocument format="pdf">
<cfdocumentsection ../>
...
...
<cfform type="html/xform">
<cfinput type="textbox" name="employeeName" value="#fullName#"
readonly="true">
<cfinput type="textbox" name="employeeID" value="#id#" readonly>
<cfselect name="contributionPercentage" options="#optionsStruct#"
required="true">
<cfinput type="submit" name="SubmitAsHTTPPost">
<cfinput type="submit" name="SubmitAsPDF" submitType="PDF">
</cfform>
...
...
<cfdocumentsection ../>
</cfdocument>
|
Of course I got all excited about it but after several attempts all I got was a
PDF document that looked like a form but that didn’t work at all. It was merely
a PDF Document.
So I wonder, is this a big goof from Adobe or can you really create dynamic PDF forms with ColdFusion (without any LiveCycle interaction).


