We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue of update a form-field's value in PDF file which is generated from code using Aspose.pdf

Hello Support-Team,

I have implemented Aspos.PDF in sample web project as mentioned on https://docs.aspose.com/pdf/net/acroforms/ and generated a PDF document, now I am trying to access form-fields using Aspose.Pdf.Facades.Form class to update an existing form-field’s value but FieldNames property doesn’t show any form-fields which is highlighted in brown color in below code.

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();
Aspose.Pdf.Generator.FormField combo = new Aspose.Pdf.Generator.FormField();

combo.FormFieldType = Aspose.Pdf.Generator.FormFieldType.Combo;
combo.FieldName = "ACombo";
combo.ChoiceOptions = new string[] { "Red", "Green", "Blue" };
combo.FieldValue = "Red";
combo.FormWidth = 80;
combo.FormHeight = 20;

string pdfFile = string.Format("{0}{1}.pdf", @"C:\PDF\", System.DateTime.Now.ToString("yyyyMMdd hhmmss"));

Aspose.Pdf.Facades.Form pdfForm = new Aspose.Pdf.Facades.Form();
string[] fields = <font color="#A52A2A"><b>pdfForm.FieldNames</b></font>;


Hi Gaurang,

Sorry for the inconvenience faced. I have managed to reproduce the reported issues on my side. I have logged the issue in our bug tracking system for further investigation and resolution, the issue ID is PDFNEWNET-34720. I have also linked your request to this issue and you will be notified via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
EN-US;mso-bidi-language:AR-SA”>Best Regards,