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

Free Support Forum - aspose.com

May Aspose.PDF crash the application?

Our application crashed. It seems like when save as docx caused.

using Document document = new(pdf);
document.Save(outputFile, new DocSaveOptions() { Format = DocSaveOptions.DocFormat.DocX });

The crash message:

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.

at #=zs0zBNhv4BO7rSF8LFohuC8hQ84Ox57OXUO8$3a4=.#=zRx$$A0E=(#=zcqZLoMDxASg_dnBatsgTbZM= #=zp7Z_1Rc=, #=zsEQHImwsl1hcKRe8p$o6$VHfdBW6TWKZEwSKfME= #=zZ6Y0Rks=)

at #=zvZddoYWVejItZfd3hQ==.#=zETeBfWI=(#=zcqZLoMDxASg_dnBatsgTbZM= #=zp7Z_1Rc=, Boolean #=zcsXG0PU=)

at #=zvZddoYWVejItZfd3hQ==.#=zm$RnM6M=()

at #=z5$EnPjjghguZuiWBPnzMlONxbc6gseUWEQ==.#=zGt6TWRg=()

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

— End of stack trace from previous location —

at System.Threading.ThreadHelper.ThreadStart()

Environment info:
Platform: Linux
Runtime: .net5.0
Production: Aspose.PDF, Version=21.7.0.0, Culture=neutral, PublicKeyToken=f0262d67fe233d63

@christy8074

There can be any reason for this Exception raised by the API. Could you please make sure that all MS Fonts are present in the system? Also, please make sure that the libgdiplus package is installed and updated. If you still face this problem, please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

I added some mscorefonts. Need to observe for a period of time.

@christy8074

Please take your time to test the cases further and feel free to let us know in case you face any issues.