Save Word DOCX Document to PDF File using C# .NET | Avoid Error Viewing PDF | System NullReferenceException

The document is transferred to the system, an error occurs when it is attempted to be viewed as pdf.
I attached the original file and corrupted file. We are using Aspose.Word.20.9 version. Thanks.


We are unable to download the file(s) you attached in first post. Please ZIP and upload your input 1) Word document, 2) Aspose.Words generated PDF file again here for testing. 3) Please also create and attach here a comparison screenshot which highlights the problematic areas in this Aspose.Words 20.9 generated PDF (with respect to original document). 4) Also, please share your environment details (OS, .NET frameworks versions etc). Do you get this particular issue on only one particular machine? We will then investigate the issue on our end and provide you more information.

The document has been transferred to the system, an error occurred while trying to view it in PDF format, the document cannot be created.
The screenshot of the error message and the original document can be downloaded by clicking the “Download” button from the link.

The application works on server 2019, .Net Framework 4.7.2


The link you shared earlier shows a “expired link” warning message. Can you please share a new link to download resources from?


After an initial test with the licensed latest (20.9) version of Aspose.Words for .NET, we were unable to reproduce this exception on our end. Please see the following PDF document generated on our end:

Simple C# Code that we used on our end for testing:

Document doc = new Document("C:\\temp\\YG12933\\original_doc.docx");

Please make sure that you are indeed using the latest 20.9 version of Aspose.Words on your end and that you had provided the correct “original_doc.docx”.

In case the problem still remains, please also create a standalone simple Console application (source code without compilation errors) that helps us to reproduce your exception on our end, ZIP it and attach the Console application here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size. We will then start further investigation into your issue and provide you more information.