Aspose.Words are not able to save document to RTF due to watermark image

Hi,

Using this code:

var doc = new Document(“bad.docx”);
doc.Save("bad.rtf’);

I’m getting different exceptions like OutOfMemory and IO.Exception.
The issue is related to image in header. Aspose.Words saving very small png image (40Kb) to huge image with the size (30MB).
Bad.zip (45.7 KB)

@licenses,

Thanks for your inquiry. We suggest you please use latest version of Aspose.Words for .NET 18.4
and following RtfSaveOptions to avoid the shared exception. Hope this helps you.

Aspose.Words.Document doc = new Aspose.Words.Document(MyDir + "Bad.docx");
RtfSaveOptions options = new RtfSaveOptions();
options.ExportImagesForOldReaders = false;
options.ExportCompactSize = true;
doc.Save(MyDir + "18.4.rtf", options);

Thank you. I will check.

Thank you. The proposed solution is working.