Environment Aspose.pdf_10_3_0 and Aspose.pdf_10_9_0. Language is c#
I have attached two documents. adobe_fields_document.pdf works fine to iterate over non-zero fields. But NewHire1.pdf has adobe fields and the count of fields is 0(pdfDocument.Form.Fields count= 0).
//Step 1: Get all Adobe fields.
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(filename);
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form(pdfDocument);
//get all field names
String allfields = form.FieldNames;
Aspose.Pdf.InteractiveFeatures.Forms.FormType formType = pdfDocument.Form.Type;
string fieldFullName = “”;
Aspose.Pdf.Facades.FormFieldFacade fieldfacade = null;
FieldType fieldType = 0;//default to Text type
foreach (Aspose.Pdf.InteractiveFeatures.Forms.Field formField in pdfDocument.Form.Fields) // pdfDocument.Form.Fields count = 0
/// rest of the code…
1. Why did it fail for NewHire1.pdf? Is there another way to extract its form fields?
2. Why does the code work for some documents and not for others? Is there a way to catch such non-working use cases?
... (process annotation)
Please feel free to contact us for any further assistance.