Tuesday, November 22, 2016

How to enumerate fields in a pdf form?

Problem:
Needed to list all the fields in an existing pdf form.  This will then be used to populate the pdf fields from a web form.


Solution:


AcroFields af = ps.AcroFields;


foreach (var field in af.Fields) {
            Console.WriteLine("{0}, {1}", field.Key, field.Value);
        }




Source:
http://stackoverflow.com/questions/3041883/how-do-i-enumerate-all-the-fields-in-a-pdf-file-in-itextsharp

No comments:

Post a Comment