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


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


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


    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);


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)


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.