I am working on a PDF Filler application that will populate fields in a PDF with values from a web form. My code works fine for older PDFs that I have but new ones that have been created with Adobe LiveCycle Designer don't seem to be able to see the fields in the PDF. It was suggested to save the PDF as "Adobe Static PDF Form" but this did not fix the issue.
Here is my code:
Doc doc = new Doc();
doc.Read(Server.MapPath("~/pdfs/test.pdf"));
foreach (Field field in doc.Form.Fields)
{
if (field.Name == "StreetAddress")
{
field.Value = StreetAddress.Text;
}
}
In my code doc.Form.Fields contains only 1 field that has the value 'form1[0]' for its name even though there actually 7 fields in the PDF.
Any help would be greatly appreciated.