Hello,
I have written VB.Net code that can successfully handle the posting of
a fillable PDF form (AcroForm). Basically, I created the form in
Adobe Acrobat Pro 9.0 and it contains a submit button which posts the
PDF form in FDF format to an apsx page on my server. In the Acrobat
settings I am sending all of the form fields in the post.
The code behind of my aspx page (the aspx.vb file) is now displaying
the name of the one and only form field on my sample PDF form (a
single text box). Also I am displaying a byte count of the FDF file
that I captured as a binary stream.
This chunk of the code below is where I use the FDFFieldIterator to
loop through the form fields and I write out the name and partial name
of the form field, as you can see. They both write out the same
name though, so I'm not sure what a "partial name" is, but I'm not
worried about that now. So writing out the field NAME works (if I
comment out the GetValue line). The line that is attempting to
write out the VALUE (text that was entered in the text box of the
form) is throwing an error, and I can't determine why.
It appears that field.GetValue() is not working. The error I am
getting is "Object reference not set to an instance of an object"
Any ideas how I can extract the value of the text box from the posted
AcroForm?
Thanks,
Charlie
************************************
While itr.HasNext()
field = itr.Current
str.Append("Field name: " & field.GetName & "<br />")
str.Append("Field partial name: " & field.GetPartialName &
"<br />")
str.Append("Field value: " & field.GetValue.ToString &
"<br />")
itr.Next()
End While