NullReferenceException when saving DOCX to PDF with MemoryOptimization enabled


#1

Hello,

The attached document is causing a NullReferenceException when saving to PDF and SaveOptions.MemoryOptimization is enabled, using Aspose.Words for NET 19.8. If SaveOptions.MemoryOptimization is not enabled, it saves correctly.

File: input.zip (25.4 KB)

Code:

var doc = new Aspose.Words.Document("input.docx");
var saveOpts = new Aspose.Words.Saving.PdfSaveOptions();
saveOpts.MemoryOptimization = true; // crash when true, ok when false
doc.Save("output.pdf", saveOpts);

If MemoryOptimization is set false (or not specified), it saves correctly. Can this please be fixed?

Thank you


#2

@ast3,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19069. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.


#3

The issues you have found earlier (filed as WORDSNET-19069) have been fixed in this Aspose.Words for .NET 19.11 update and this Aspose.Words for Java 19.11 update.


#4

I have re-tested and confirm that the update has solved the issue - thank you!


#5

@ast3,

Thanks for your feedback. In case you have further inquiries or need any help in future, please let us know.