Previous | Next | (P-PDF) Acrobat 7
Topic: Processing Acrobat 7 form in ColdFusion
Conf: (P-PDF) Acrobat 7, Msg: 135527
From: CriticalIM
Date: 6/30/2005 02:08 AM
I have struggled with the same issue for a while and finally have a solution.
Firstly, the field formatting when posting from PDF is bracketed which is a problem because CF expects that the data is an array and will throw java errors. This will happen even if you try to just read the variable. The solution I have come up with is to strip out all the garbage, ie; Brackets and page names to get just the field names and values.
The way I accomplished this was to create a CSCRIPT to set the field names to elimiate the Java error and the replace all the garbage to get just the field name and associated value.
This forum does not like cfsnippets. My code never posts correctly.
CSCRIPT Function To Escape Java Array Issue
function FormatFormField(fld) {
if(structIsEmpty(form)) return;
FormFieldValue = form[fld];
}
CFLOOP over Form.FieldNames
cfset FormatFormField(X)
FieldName = ReplaceNoCase (FieldName, "[0]", "", "ALL")>
The Value Of Field #FieldName# = #FormFieldValue#
FYI: I actually extract all the fields (500+) then create an XML packet and store it in a database, in case you are interested in doing that. Has turned out to be a flexible and easy solution.
Allen
Webmaster BLX