![coldfusion 11 pdf coldfusion 11 pdf](https://1.bp.blogspot.com/-feJAZcr1gnM/U19VqzBbGUI/AAAAAAAAAO8/vaJSpYOx1ew/s1600/originalRoadMap.png)
Hope this helps! Here is the complete POC I built. Again - I had to use my original form quite a bit here to see what values were being persisted when I entered data. The no value was only true when the value was No and yes was only true when the value was yes. I assumed there would be two fields for this representing each checkbox. Another field on the form had something like this: "Is Ray Cool No Yes". To make it even more interesting, not all checkboxes act the same. I then saved it, reran my "get the fields and dump them" script, and I saw that when I checked a checkbox, the value was On.
#Coldfusion 11 pdf pdf#
So then I went back to my original PDF form and did the obvious - I checked the checkbox.
![coldfusion 11 pdf coldfusion 11 pdf](https://slidetodoc.com/presentation_image_h/b4bce844fbbd64c025d84b87a986879d/image-11.jpg)
I tried setting them by using true, 1, and "checked" as values, but nothing worked. For text fields, you could easily set them by just supplying a value:
#Coldfusion 11 pdf code#
I ended up using this script as a guide for building my code that would then set the fields.
![coldfusion 11 pdf coldfusion 11 pdf](https://i.stack.imgur.com/NNfXG.png)
Some fields did have obvious names but many did not. This is important because you probably can't guess them just by looking. Now that my script worked, I could use the struct as a way of seeing the names of the form fields. I still think ColdFusion should be able to sniff that form type and throw an exception (one that is helpful), but, now you know, and knowing is you know what. Luckily the client had a newer form of the PDF and as soon as I changed to that, it worked. Third-party PDF form creation tools generally create AcroForms rather than LC forms, but there may be third-party tools available that create LC forms that I don't know about. Forms created directly in Acrobat are not LC forms - they're generally called "AcroForms". LC forms are basically a PDF container for an XFA payload - the form itself is represented as an XML document conforming to the XFA schema.
#Coldfusion 11 pdf pro#
LiveCycle forms are created using LiveCycle Designer, which ships with Acrobat Pro (and is available separately). He went on to say: It has to be a LiveCycle form. I needed a PDF using the newer style called a LiveCycle form. All around smart guy Dave Watts suggested that the PDF I had was probably using an older style of form called "AcroForm". At this point I had no idea what to do so I asked around. But if I tried to parse the XML variable (X), I got an error stating the XML was invalid. On a whim I got rid of the result attribute. When I ran it I got: Either datafile XML or data XML contained in the PDF document is invalid. The code above should have retrieved the form data as both a struct and XML. But in ColdFusion something odd happened when I tried to get data out of it. The first thing I ran into was that the initial PDF was not compliant with ColdFusion's PDF form handling. For the most part the process was painless, but there were a few gotchas I wanted to share with folks. This user needed the input to be passed to the PDF and saved there. A client needed me to build a simple POC that used an HTML form to accept user input.
ColdFusion has had the ability to work with PDF forms for a while, but I never got a chance to actually play with it till last night.