I am trying to populate a pdf (application, complete with form fields, altho not all are named uniquely) from a form. I am having trouble populating certain fields which are undefined/unnamed in the original pdf, or which seem to have child arrays I can't get to...I know this has got to be simple. Usually when parsing RSS all I have to do is:


The form itself is nothing special just html. Here is the Coldfusion I am using to process it and write the pdf values:

<cfpdfform source="form.pdf" destination="moosh.pdf" action="populate" overwrite="yes" >

    <cfpdfsubform name="topmostSubform">

<cfpdfformparam name="Employer_Name___Address_incl_zip" value="#form.Employer_Name___Address_incl_zip#">

        <cfpdfformparam name="phone" value="#form.phone#">

        <cfpdfformparam name="Report_Purpose_Code[1]" value="#form.Report_Purpose_Code[1]#">  

                <cfpdfformparam name="Report_Purpose_Code" value="#form.Report_Purpose_Code#">  

        <cfpdfformparam name="Agent_Name___Code_Number" value="#form.Agent_Name___Code_Number#">    

Here is an image of the pdf dump showing what I think is the issue...

Bound to be something simple. I am thinking I should remake their pdf and properly name each form field...

*update: now that i am logged in to my native system i do see an error:
You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. "

Edited by hinsel: can view error dump. still puzzled.

Attachments pdfdump.jpg 14.19 KB
8 Years
Discussion Span
Last Post by arrgh


FORM fields aren't arrays. They're simple names. So make the <form> field names unique, and use the simple names to populate the form.

... value="#form.Report_Purpose_Code1#">
... value="#form.Report_Purpose_Code2#">

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.