tags:

views:

97

answers:

2

Let's say I've loaded a PDF file using iTextSharp:

PdfStamper p = GetDocument();
AcroFields af = ps.AcroFields;

How do I get a list of all field names on the document from af?

A: 
AcroFields af = ps.AcroFields;

        foreach (var field in af.Fields)
        {
            Console.WriteLine("{0}, {1}",
                field.Key,
                field.Value);
        }
Sander Pham
A: 
foreach (DictionaryEntry entry in af.Fields) {
   Console.WriteLine(entry.Key +" " +entry.Value);
}
cecilphillip