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

Free Support Forum - aspose.com

Form.fieldnames method ( how to? )

I am writing an asp.net application. i want to fill a pdf form (the source of form is another department), where
I do not know what the field names are? How do I use the form.fieldnames method to get the
field names? Please advice. Thank you so much. I need a vb.net example, but c-sharp is ok too.

i solved my own problem: here is the code:

Dim in_form As Form
Dim strFieldName As String
Dim test() As String
Dim intCounter As Integer = 0
Dim intfieldcnt As Integer
in_form = New Form(strfileIn)
test = in_form.FieldsNames
intfieldcnt = UBound(test) - LBound(test) + 1
For intCounter = 0 To (intfieldcnt - 1)
strFieldName = test(intCounter)
Response.Write(strFieldName & “

i get 3 pages of fieldnames.
I hope this helps some one else.

Dear jaydean,

Thanks for your considering Aspose.

And Thank you for your good example.

By the way, you could first read the TOP thread in this forum. It will give you some useful information too.

Best regards.

I have exactly same issue, in my case I am trying to open an Unsecured PDF file to read the fields present in the form and then print their names on the screen. As I am new to Aspose, I started with an example available on the site the code reads exactly same as specified below. However in my case the FieldNames collection always returns 0 size.

I am not sure if this is caused by the PDF format or something. I am trying to open a standard Acord PDF form. I have attached the form with the post, Please let me know if your code works with this form.

On a side note, I can see the fields in the form with I open it with the Adobe X Pro.

Please consider this as an urgent request and let me know at your earliest.

Kind regards,

Hi Prashant,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the template file.

Well, when I open your shared PDF file with Adobe Acrobat X PRO and use the Form Edit option (ToolsàFromsàEdit), adobe gives a prompt “currently there are no form fields in this PDF. Do you want Acrobat to detect form fields for you”. This means that there are no form fields in your PDF document. Please check and let us know if you are having some different results.

Sorry for the inconvenience,