Free Support Forum -

Field Form Question


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.



Thank you for considering Aspose.

I have found a bug on Form color and fixed it. Please try the attachment.

I tried the library and ran into the same issue. What bug does this fix?

I used Aspose.Pdf.Kit to test the PDF created by your code and found a bug about color. Now it works with Aspose.Pdf.Kit. I will study further to get to know why it can’t work for Adobe API.