System.NullReferenceException when calling Aspose.Pdf.Forms.Field.Flatten()

I have this PDF file with many fields:
4625264.pdf (979.6 KB)

When I’m looping over the fields and calling flatten() I get many NULL exceptions.
Here is my code:

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document("4625264.pdf");
foreach (Aspose.Pdf.Forms.Field field in pdfDocument.Form.Fields)
{
  field.Flatten();
}

@nir-1

We tested with 24.8 version of the API and could not replicate the issue in our environment. Can you please make sure if you are using the latest version of the API?

I am using version 24.8 but have the error

@nir-1

It looks strange. It can be due to missing fonts as well. Can you please share your environment details with complete exception message and the stack trace?