Free Support Forum - aspose.com

Image Missing In The Output File After Saving An ODT File

I'm opening an ODT file, modifying some text using replace (when it applies) then saving it as ODT again. However, the images that I have in the original file, which is in the header, is missing in the output file. The sample files are attached. I'm using the following code:

Document doc = new Document(pFileName);
doc.Save(pTmpFileName, Aspose.Words.SaveFormat.Odt);

Hi

Thanks for your request. The problem occurs because Aspose.Words does not support SVM images. So such images will be lost upon processing ODT documents. Unfortunately, at the moment we do not plan to support this kind of images in ODT. So as a workaround, I can suggest you using another image format.

Best regards,

Did you mean SVG?

Hi Rogger,

Thanks for your request. No, I do not mean SVG. I mean SVM. If you unzip your ODT document, you can find all images used in the document in Pictures folder. You will see that your document contains SVM images.

Best regards,

You’re right. Do you have any suggestions on how can I work around this? Can I dinamically substitute those SVM images with Image Formats that Aspose supports, so I don’t need to replace every file that uses SVM images?

Hi Rogger,

Thanks for your request. OpenOffice provides some API to work with documents programmatically. I suppose, you can use this API to automate process of replacing SVM images.

Best regards,