Convert PDF with XFA forms to PDF using Aspose.PDF in C# – Error when opening the document

Hi,

I have a PDF that contains XFA forms, and I try to covert it to a regular PDF using Aspose.PDF in C# .net.
The conversion process seems to be successful, but when I open the converted file using Adobe Acrobat Reader (ver. 2023.006.20320), I encounter the following error:

error.png (5.8 KB)

Could you please tell me what might be causing this issue?

Here is the code I use:

    public static void ConvertPdfToPdf(Stream inputStream, string targetPath)
    {
      Aspose.Pdf.Document pdfDocument = null;
      pdfDocument = new Aspose.Pdf.Document(inputStream);
      pdfDocument.Save(targetPath);
    }

input.pdf (202.7 KB)

output.pdf (207.0 KB)

@directum
What version of the library are you using?
When I trying reproduce issue, for code running in .Net6 and
output.pdf (204.5 KB)

library version 23.9, the document output.pdf is opened by an Acrobat.

using (var inputStream = File.OpenRead(dataDir + "input.pdf"))
{
    var pdfDocument = new Aspose.Pdf.Document(inputStream);
    pdfDocument.Save(dataDir + "output.pdf");
}

I tried version 23.9, it works. Thanks!