Product: PDFTron.NET.x64 C#
Product Version: 9.0.0 and 9.1.0
Please give a brief summary of your issue:
Unable to cast Annot back to widget
Please describe your issue and provide steps to reproduce it:
I having issue in the code. When I open a pdf document with form, I cannot cast the annot into widget to get the field information, even though it is a widget type.
Please provide a link to a minimal sample where the issue is reproducible:
Here is the sample code:
using (PDFDoc doc = new PDFDoc("some document with form and text field") {
var page = doc.GetPage(1);
var annot = page.GetAnnot(0);
if (annot.GetType() == Annot.Type.e_Widget)
{
var widget = annot as Widget; // ** Cannot cast back to widget
var field = widget.GetField();
.....
}
}