Sep 13, 2019 05:32 AM|Yongqing Yu|LINK
However, in VS I am getting the error "Value of type 'KeyValuePair(Of String, AcroFields.Item) cannot be converted to 'DictionaryEntry'
This error shows that the type of pdfReader.AcroFields.Fields is different from the DictionaryEntry type.
There is one of the most convenient and commonly used var
types to replace DictionaryEntry,
var is an implicitly typed local variable which is strongly typed just as if you had declared the type you, but the compiler determines the type.
Or, you can use KeyValuePair<string, AcroFields.Item> to replace DictionaryEntry.
You can refer to this link : How do I enumerate all the fields in a PDF file in ITextSharp