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

Free Support Forum - aspose.com

NullReferenceException when converting specified docx file

Hello, Aspose,


I have a problem with conversion of some docx file. When I try to convert it I get an exception of type System.NullReferenceException - Object reference not set to an instance of an object.

See my code below:
var inputDocument = new Aspose.Words.Document(inputFilePath);

var pdfSaveOptions = new Aspose.Words.Saving.PdfSaveOptions();

inputDocument.Save(outputFilePath, pdfSaveOptions);

The line inputDocument.Save(outputFilePath, pdfSaveOptions); causes described error.

I have attached the file that causes the exception to simply reproduce the problem.

Could you please help me with this problem? Any help will be appreciated.

Best Regards,
Mike

I’ll try to help.


Where is outputFilePath defined? You refer to it, but did you define it anywhere?

These variables (outputFilePath and inputFilePath) defined earlier. I didn`t include them to the sample. It is just a path to my file system.

If they are important to clarify the problem I will add it to example. Should I do it?

Best Regards,
Mike

Hi Jeff,

Thanks for your inquiry.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10848. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-10848) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.