Everyone:
I create uniquely named PDF Form Fields using the C# Code below:
In the context below, queriesTable.Rows[x]["Ref #"].ToString() is a unique identifier and queriesTable.Rows[x]["Form Name"].ToString() is just text.
FormField formNameField = new FormField();
formNameField.FieldName = "PHIL_FIELD_" + queriesTable.Rows[x]["Ref #"].ToString();
formNameField.FormFieldType = FormFieldType.Text;
formNameField.TextColor = System.Drawing.Color.Blue;
formNameField.FieldValue = queriesTable.Rows[x]["Form Name"].ToString();
formNameField.TextFontName = "Helvetica";
formNameField.TextFontSize = 10;
formNameField.FormWidth = 65;
formNameField.TextIsMultiLine = true;
Cell formNameCell = new Cell (tableRow);
formNameCell.Paragraphs.Add (formNameField);
tableRow.Cells.Add (formNameCell);
When I save the PDF file and open it in Acrobat, I can see the fields. But when I open the file using the Acrobat API I cannot see these fields (using the IFields object). Does anyone have any suggestions as to how to deal with this?
Also, is there a way to use Aspose.PDF to attach JavaScript to a created form field and set its default value? If I could do this then the Acrobat API would not even be necessary.
Thanks.