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

Free Support Forum - aspose.com

Random to throw NullReferenceException when save PDF to Docx

Description

Aspose.PDF random to throw NullReferenceException when save some PDF to Docx via Parallel.

Environment

  • Windows 10 .NET 4.7
  • Aspose.PDF for .NET 22.12

Code

    Parallel.For(1, 6, (i) =>
    {
        var doc = new Aspose.Pdf.Document(@"C:\Users\XCL\Desktop\test\source" + i + ".pdf");
        doc.Save(@"C:\Users\XCL\Desktop\test\target" + i + ".docx", Aspose.Pdf.SaveFormat.DocX);
    });

Note

We need to run code above more times ( I ran it 15 times) and we will see the exception:
image.png (186.7 KB)

Test Files

test.zip (277.9 KB)

@xucongli1989

We have logged this problem in our issue tracking system as PDFNET-53361. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.