When using the code below to flatten fields in the attached PDF, an error is raised. It seems to be a problem if there is a period in a field name.
Hi Stacey,
Thanks for using our API’s.
I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-38785. We will investigate this issue in details and will keep you updated on the status of a correction
We apologize for your inconvenience.
Checking if there is any status on bug PDFNEWNET-38785.
Hi Kim,
Hi Kim.
Thanks for your patience.
We have further investigated the earlier reported issue and have observed that you are trying to flatten the “group” field. In order to get the desired output, please modify the CollectField() method in the following manner.
Please try using the latest release of Aspose.Pdf for .NET 11.8.0. If you still face the same problem or have any further queries, please feel free to contact.
[C#]
private void CollectFields(Field field, List<Field> fields)
{
if (fields != null)
{
if (field.Count > 0)
{
foreach (var subF in field)
{
var subField = subF as Field;
if (subField != null)
{
CollectFields(subField, fields);
}
}
}
else
{
fields.Add(field);
}
}
}
Thank you. This did the trick!
Hi Kim,