for(inti=0;i<data.Count;i++){Console.Write(data[i].Name+": ");PageTextAreaarea=data[i].PageAreaasPageTextArea;Console.WriteLine(area==null?"Not a template field":area.Text);}
FieldData class represents field data. Depending on the field PageArea property can contain any of the inheritors of PageArea class. For example, ParseForm method extracts only text fields:
// Create the parserusing(Parserparser=newParser(filePath)){// Extract data from PDF FormDocumentDatadata=parser.ParseForm();// Iterate over extracted fieldsfor(inti=0;i<data.Count;i++){// Get the extracted fieldFieldDatafield=data[i];// Print the field nameConsole.Write(field.Name+": ");// Check if the field value is a text and print itPageTextAreaarea=field.PageAreaasPageTextArea;Console.WriteLine(area==null?"Not a template field":area.Text);}}