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

Free Support Forum - aspose.com

Object reference exception thrown on converting a PDF to DOCX

Hi Aspose,

I have a PDF file and I want to convert it to DOCX, and Aspose.PDF throw an exception said “Object reference not set to an instance of an object.”

I use the sample code like this:

Document pdfDocument = new Document(_dataDir + "testfile.pdf");
pdfDocument.Save(_dataDir + "testfile.doc", SaveFormat.DocX);

This is a 2-page file extract from our test file test file.pdf (155.0 KB)

Thanks.

@Glority_Developer

I can not reproduce the exception with latest version and the output DOCX file is created fine. However, the output file is not being opened by MS Word. A ticket with ID PDFNET-50018 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.