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

Free Support Forum - aspose.com

Parsing Field information within Sub Forms

Dear Support,

I have a question about attached document as an example:

I noticed that a bunch of the following fields exist, some of them appear to be sub-forms. How do i extract them as a fieldfacade?

Code I am using:
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form(<file_name>);
fieldfacade = form.GetFieldFacade(<field_name>);

I see the following field names when I did: String[] allfields = form.FieldNames; How do I get each of them and their actual field rectangular Box?

---------------------topmostSubform[0].Page2[0].TextField23[2]
---------------------Check Box9
---------------------topmostSubform[0].Page1[0].CheckBox5[0]
---------------------topmostSubform[0].Page2[0].Address[0]
---------------------Text90
---------------------topmostSubform[0].Page1[0].TextField10[0]
---------------------Check Box96
---------------------topmostSubform[0].Page2[0].Job_Title_3[0]
---------------------topmostSubform[0].Page1[0].TextField16[0]
---------------------topmostSubform[0].Page3[0].Other[0]
---------------------topmostSubform[0].Page2[0].Name_of_Supervisor[0]
---------------------topmostSubform[0].Page2[0].TextField23[0]
---------------------Text105
---------------------Text103
---------------------Text86
---------------------topmostSubform[0].Page2[0].Name_of_Supervisor_4[0]
---------------------Text68
---------------------Text78
---------------------Text48
---------------------Text58
---------------------Text28
---------------------Text38
---------------------Text18
---------------------Text106
---------------------Text88
---------------------topmostSubform[0].Page2[0].Description_of_Duties[0]
---------------------topmostSubform[0].Page3[0].College_Recruiting[0]
---------------------topmostSubform[0].Page2[0].Reason_for_Leaving_2[0]
---------------------topmostSubform[0].Page1[0].CheckBox12[0]
---------------------Text69
---------------------Text79
---------------------Text49
---------------------Text59
---------------------Text29
---------------------Text39
---------------------Text19
---------------------topmostSubform[0].Page1[0].TextField17[0]
---------------------Text89
---------------------topmostSubform[0].Page2[0].Name_of_Supervisor_2[0]
---------------------topmostSubform[0].Page2[0].TextField22[3]
---------------------topmostSubform[0].Page1[0].CheckBox8[0]
---------------------Check Box17
---------------------topmostSubform[0].Page1[0].TextField11[0]
---------------------Check Box95
---------------------topmostSubform[0].Page2[0].Reason_for_Leaving_4[0]
---------------------Text93
---------------------topmostSubform[0].Page2[0].TextField21[2]
---------------------topmostSubform[0].Page1[0].TextField18[1]
---------------------topmostSubform[0].Page1[0].CheckBox11[0]
---------------------topmostSubform[0].Page2[0].Address_4[0]
---------------------Check Box101
---------------------Text104
---------------------Text66
---------------------Text76
---------------------Text46
---------------------Text56
---------------------topmostSubform[0].Page1[0].TextField12[0]
---------------------Text36
---------------------topmostSubform[0].Page2[0].TextField22[1]
---------------------topmostSubform[0].Page1[0].TextField14[0]
---------------------Check Box100
---------------------Check Box102
---------------------Text26
---------------------topmostSubform[0].Page2[0].TextField23[3]
---------------------topmostSubform[0].Page2[0].Description_of_Duties_2[0]
---------------------Text77
---------------------Text47
---------------------Text57
---------------------Text27
---------------------Text37
---------------------topmostSubform[0].Page2[0].TextField21[0]
---------------------topmostSubform[0].Page2[0].Description_of_Duties_4[0]
---------------------Check Box99
---------------------Text87
---------------------topmostSubform[0].Page1[0].TextField2[0]
---------------------topmostSubform[0].Page1[0].TextField19[1]
---------------------Check Box23
---------------------Text64
---------------------Text74
---------------------topmostSubform[0].Page1[0].CheckBox9[0]
---------------------Check Box16
---------------------Text24
---------------------Text34
---------------------Text14
---------------------Text42
---------------------Text84
---------------------Check Box20
---------------------topmostSubform[0].Page2[0].Job_Title[0]
---------------------Text50
---------------------Text65
---------------------Text75
---------------------Text45
---------------------Text55
---------------------Text25
---------------------Text35
---------------------topmostSubform[0].Page1[0].TextField15[0]
---------------------Text15
---------------------topmostSubform[0].Page1[0].CheckBox15[0]
---------------------topmostSubform[0].Page1[0].CheckBox14[0]
---------------------Text85
---------------------Check Box10
---------------------topmostSubform[0].Page2[0].Description_of_Duties_3[0]
---------------------Check Box98
---------------------Text92
---------------------Text62
---------------------Text72
---------------------Text7
---------------------Text52
---------------------Text5
---------------------Text32
---------------------Text12
---------------------topmostSubform[0].Page2[0].Address_3[0]
---------------------Text4
---------------------Text82
---------------------Text8
---------------------topmostSubform[0].Page1[0].TextField16[1]
---------------------FName
---------------------Text63
---------------------Text73
---------------------Text43
---------------------Text53
---------------------Text33
---------------------Text13
---------------------LName
---------------------topmostSubform[0].Page1[0].CheckBox10[0]
---------------------Text83
---------------------topmostSubform[0].Page2[0].TextField23[1]
---------------------Text60
---------------------Text40
---------------------Check Box22
---------------------topmostSubform[0].Page2[0].Reason_for_Leaving[0]
---------------------Text30
---------------------Text44
---------------------topmostSubform[0].Page2[0].TextField21[3]
---------------------Text80
---------------------topmostSubform[0].Page1[0].TextField18[0]
---------------------Text91
---------------------Text61
---------------------Text71
---------------------Text41
---------------------Text51
---------------------topmostSubform[0].Page1[0].TextField20[0]
---------------------Text31
---------------------topmostSubform[0].Page3[0].CommunityState_Agency[0]
---------------------Text11
---------------------Text81
---------------------topmostSubform[0].Page1[0].TextField17[1]
---------------------Text94
---------------------Check Box97
---------------------topmostSubform[0].Page2[0].TextField22[2]
---------------------signhere_es_:signer1signature
---------------------topmostSubform[0].Page2[0].Address_2[0]
---------------------topmostSubform[0].Page2[0].Job_Title_4[0]
---------------------topmostSubform[0].Page2[0].TextField21[1]
---------------------topmostSubform[0].Page1[0].TextField13[0]
---------------------topmostSubform[0].Page2[0].Job_Title_2[0]
---------------------topmostSubform[0].Page1[0].TextField19[0]
---------------------middlename
---------------------Text107
---------------------es:signer:email
---------------------Check Box21
---------------------topmostSubform[0].Page2[0].TextField22[0]
---------------------Text54
---------------------topmostSubform[0].Page2[0].Reason_for_Leaving_3[0]
---------------------topmostSubform[0].Page1[0].CheckBox13[0]

Hi Siri,


Thanks for contacting support.

As per my understanding, the form fields are given name as topmostSubform[0].Page2[0].TextField22[2] etc and you can access their values/update field values by using this name. Furthermore, in order to get the rectangular coordinates of each field, please try using the code snippet shared over Identifying form fields names

In case I have not properly understood your requirement, please share some further details.