Convert from xfa to standard corrupts text in the document

please review the attached documents.

code to convert is

Public Sub ConvertXFAtoAcroform(ByVal PDFFilePath As String, ByVal pDestinationFile As String, ByVal Flatten As Boolean, ByVal pProtect As Integer)

    Using PDFDoc As New Document(PDFFilePath)
        PDFDoc.Form.Type = FormType.Standard
        If Flatten Then
            FlattenAnnotations(PDFDoc)
        End If

        PDFDoc.Save(pDestinationFile)
    End Using

End Sub

Aspose version is .NET 4.0 ConvertedAndFlattened.pdf (1018.5 KB)
Converted.pdf (1005.1 KB)
Orginal.pdf (299.7 KB)
22.1.0.0

@Andre123

Could you please share the code of FlattenAnnotations method for testing?

The flatten annotation has no bearing on the out put of the conversion process…the document is still corrupted when only a conversion is attempted. I plainly supplied a copy of the document which was NOT put through the FLATTEN process. Please stop wasting my time and yours with this back and forward exchange of email and address the issue I have raised.

I will include the code for your benefit BUT please note. IT HAS NO BEARING ON THE ISSUE I HAVE RAISED

Public Function FlattenAnnotations(ByRef pdfdocument As Document) As Boolean
Try
Dim pdfForm As New Aspose.Pdf.Facades.Form()
pdfForm.BindPdf(pdfdocument)
pdfForm.FlattenAllFields()

    Catch ex As Exception
        Return False
    Finally

    End Try
    Return True
End Function

I have another question which relates to this post.
Is there a method in aspose PDF to test for whether a PDF is an XFA pdf?

@Andre123

We are working over your query and will get back to you soon.

@Andre123

The Form.XFA.FieldNames property returns null if PDF is not an XFA PDF. Please read following article for more detail.
Working with XFA Forms

We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFNET-51297. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank you
Are you able to provide an eta for a fix to this issue?
Frankly we are due for renewal and I think that the $10,000.00…yes that 10,000.00 dollars is not the best way to spend our resources particularly as the issue affect a considerable number of our customers and aspose has been les than helpful in the past with promptness in addressing issues

@Andre123

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

We are really very sorry for your inconvenience.

The issue is showing as resolved but it is not listed as a fix in any release notes.
Please explain

@Andre123

Your issue has been resolved and its fix will be available in the next version of Aspose.PDF i.e. 22.4. We will inform you via this forum thread once this release is published.

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