Significant Slow down in Flattening Annotations

Hi Guys
The problem affects 24.9 and 24.10
We are observing a significant slow down to the processing of the attached file using the above versions. The problem is not present in 24.8

The issue occurs in with the following code during the flattening process

Using Doc As New Document(pSourceFile)

        For Each p As Page In Doc.Pages
            For Each an As Annotation In p.Annotations
                an.Flatten()
            Next
        Next
    End If

8d754a93-3443-4b73-841f-0d2c30d1bf34 1.pdf (3.5 MB)

    If pDestination.Length > 0 Then
        Doc.Save(pDestination)
    Else
        Doc.Save(pSourceFile)
    End If
End Using

Catch ex As Exception
Return False
Finally

@Andre123
We are looking into your matter and will write to you soon.

@Andre123
The issue has been reproduced, the performance regression is quite significant.
I will create a task for the development team.
Thanks for writing to us.

@Andre123
As a workaround, I can suggest using the Flatten() method on the Page object (instead of calling it separately for each annotation) - this works just as fast.

@Andre123
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-58432

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.