NullReferenceException when converting .docx to pdf


#1

System.NullReferenceException : Object reference not set to an instance of an object.
at .(Queue`1 , Int32 , Boolean )
at .( , Int32 )
at .( )
at .( )
at .( )
at .( , Int32 )
at .( )
at .( )
at .( , Int32 )
at .( , Int32 , Boolean )
at .()
at .( , Int32 , Boolean , Boolean )
at .()
at .( , Int32 )
at .( )
at .()
at .( )
at .( )
at .( )
at .( )
at .()
at .()
at Aspose.Words.Document.UpdatePageLayout()
at .( , )
at . ​ ​​( )
at . ​​( )
at Aspose.Words.Document.( , SaveOptions )
at Aspose.Words.Document.(Stream , String , SaveOptions )

Tgt.zip (29.0 KB)


#2

@christy8074,

After an initial test with the licensed latest version of Aspose.Words for .NET i.e. 19.9, we were unable to reproduce this issue on our end.

Please see the following output PDF file that we generated from your DOCX file by using the following simple code of Aspose.Words:

Document doc = new Document("E:\\Tgt\\Tgt.docx");
doc.Save("E:\\Tgt\\19.9.pdf");

So, please upgrade to the latest version i.e. 19.9. Hope, this helps.


#3

Fixed by 19.10. Thanks.


#4

@christy8074,

Thanks for your feedback. It is great that you are able to resolve this issue on your end by using the latest version of Aspose.Words for .NET. In case you have further inquiries or need any help in future, please let us know.