We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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
        End If

    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)


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
Dim pdfForm As New Aspose.Pdf.Facades.Form()

    Catch ex As Exception
        Return False

    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?


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


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


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


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.