0

I have a script that retrieves values from the database and fills them into a PDF form. Is there any way I can pass a single array to CFPDFFORM and have it set all the params at once, without enumerating each one explicitly as below? Where the key of my array would be the name of the param, and the value would be the value of the param?

<cfpdfform source="mypdf.pdf"
     action="populate">
        <cfpdfformparam name="a" value="25"> 
        <cfpdfformparam name="B" value="3"> 
        <cfpdfformparam name="C" value="2"> 
</cfpdfform>
aw crud
  • 8,791
  • 19
  • 71
  • 115
  • I don't think you can pass a single array but you can pass XML data. If you can spit it out as xml...but that seems to require storing it in or as a file: [cfpdfform](http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_03.html) – jk. Jul 18 '11 at 19:20
  • 1
    .. Or you could *dynamically* enumerate through a query or structure of values. For example ``. – Leigh Jul 19 '11 at 12:55

1 Answers1

0

you can not pass a single array to cfpdfform.

you can only pass bunch of cfpdfformparam or an XML (string, obj, file all will do).

If you have lots of fields to fill up, I would suggest using xml.

Seeker
  • 1,250
  • 1
  • 16
  • 23