Aspose.PDF loading documents throw exception Memory stream is empty

Hi team,

I have an issue with Aspose PDF (version 21.9) .NET Core version under Windows and Linux when Aspose PDF loads document, it throws exceptions:

  • Windows: Memory stream is empty
  • Linux: Namespace prefix ‘cfg’ is not defined

But when loading the pdf document for the second time after that:

  • Windows still throws an exception “Memory stream is empty”
  • Linux loads successfully

My sample code:

using(var document = new Aspose.Pdf.Document(inputFile)) {…}

using(var pdfDocument = new Aspose.Pdf.Document(inputFile)) {…}

Here are the sample files sample.zip (26.2 KB)

Please help investigate and fix the issue.
Thanks.

@dunghnguyen

I request you to share a sample application for our investigations.

@mudassir.fayyaz
I send you the sample application. Hope you can reproduce. Thank you. SampleApplication.zip (1.8 KB)

@dunghnguyen

We are checking it and will get back to you shortly.

1 Like

@dunghnguyen

I request you to share the sample files once again because the uploaded file (sample.zip) may contain a virus.

@mudassir.fayyaz
I send back the sample files. The password is 123.Sample.zip (26.5 KB)

@dunghnguyen

A ticket with ID PDFNET-50784 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Hi @mudassir.fayyaz
Is there any update on this issue?
Thanks.

@dunghnguyen

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.

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