title: How to determine field type from a field in a PDF document using iTextSharp?
body: <p>I'm experimenting with the iTextSharp library with C# and VisualStudio.  I'm trying to obtain field names and field types (TextBox, RadioButton, ComboBox, CheckBox) from the AcroFields object.  </p>
  
  <p>Field names were easy to find but I'm struggling with field type.  I've checked the iText javadoc because someone on here said the methods and functions should be similar in iTextSharp but have not found that to be the case.</p>
  
  <p>Here's my code that get's the field names:</p>
  
  <pre><code>FormObject fo = new FormObject();
  List&lt;FormField&gt; form_fields = new List&lt;FormField&gt;();
  
  PdfReader reader = new PdfReader(file_name);
  AcroFields reader_fields = reader.AcroFields;
  
  foreach (KeyValuePair&lt;String, iTextSharp.text.pdf.AcroFields.Item&gt; entry in reader_fields.Fields)
  {
      FormField ff = new FormField();
      ff.Field_name = entry.Key.ToString();
      form_fields.Add(ff);
  }
  </code></pre>
  
  <p>Any ideas on how I can extract the field type from the AcroFields object?  I know it has to be in there somewhere...</p>