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
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
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.
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.
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.