Resaving RTF document with image as RTF explodes file size

We have RTF “templates” that are opened in Aspose, modified and saved. These templates are RTF for a number of reasons and can contain images. This makes the template RTFs big, and we know that. However, simply opening and saving one of these RTF makes the RTF go from 2M to 37M in size (and production goes from 4M to 75M)

This was not the case in 8.2.1 and is the case in 10.5 and 10.6. I’m attaching reproduction code it’s really obvious.

Just to clarify, the issue isn’t going from .doc to .rtf, we know that increases file size. The issue is loading a .rtf and saving it back as rtf explodes it.

Hi
Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards,

Hi Walden,

You can avoid this issue for now by disabling the ExportImagesForOldReaders setting. This will cause the size of your output RTF to become only 132kb. However as the setting implies, your document may not display properly on older readers.

Document doc = new Document("source.rtf");
RtfSaveOptions saveOptions = new RtfSaveOptions();
saveOptions.ExportImagesForOldReaders = false;
doc.Save("target.rtf", saveOptions);

Thanks,