Flatten a PDF document in C# using Aspose.PDF - Field not Found Error

I have a document that throws a field not found error when using Document.Flatten() or Form.FlattenAllFields().

However if I iterate through all the field names and use Form.FlattenField(), it works. I am using this as a workaround for now.

I’ve updated to latest version of Apose.PDF (20.3.0), and still fails.

When I iterate through the fields, I can see that all have a full name and some have an empty name.

@Johnwpowellryan

Would you kindly share sample PDF document for our reference. We will test the scenario in our environment and address it accordingly.

AL_Form_2_Filled.pdf (3.6 MB)

@Johnwpowellryan

We have been able to reproduce the issue in our environment and logged it as PDFNET-47825 in our issue tracking system. We will further investigate this in details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

@asad.ali ,

Confirming my team is also seeing this issue when trying to flatten all fields

1 Like

@bvk

We have updated the logged ticket information accordingly and will inform you within this forum thread as soon as it is resolved. Please give us some time.

We are sorry for the inconvenience caused.

The issues you have found earlier (filed as PDFNET-47825) have been fixed in Aspose.PDF for .NET 22.7.

We have tested the fix in 22.7 and the error message is suppressed but the field is not being flattened (still editable).

@Johnwpowellryan

We have recorded your feedback under the ticket and will further investigate it. We will inform you in case of any updates in this regard. We apologize for the inconvenience.

@Johnwpowellryan

Another ticket as PDFNET-52175 has been logged in our issue tracking system as some of the Acroform fields were not flattened. We will further investigate it and let you know as soon as the issue is resolved.

We apologize for the inconvenience caused.

The issues you have found earlier (filed as PDFNET-52175) have been fixed in Aspose.PDF for .NET 22.8.