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

Free Support Forum - aspose.com

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.
YG12933

@srmbimser,

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.
http://dm.bimser.com.tr/eba.net/Default.aspx?turl=zlWby8jnVUmTvVw-NdZVng

The application works on server 2019, .Net Framework 4.7.2

@srmbimser,

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

http://dm.bimser.com.tr/eba.net/Default.aspx?turl=3e6fV4_OPEaKAzewOVF41Q

@srmbimser,

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");
doc.Save("C:\\temp\\YG12933\\20.9.pdf");

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.