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

Free Support Forum - aspose.com

Dot files get corrupted after saving them

I’m currently using Aspose.Words 11.1
When I’m loading a .dot file into a Document and then saving it with out making further changes, the document gets corrupted after saving it.

Code snippet:
File file = new File(resourcesPath, location);
input = new FileInputStream(file);
com.aspose.words.Document doc = new com.aspose.words.Document(input);
doc.save(file.getAbsolutePath(), LoadFormat.DOT);

Find a couple of templates attached, this is just a new empty template which was loaded and saved. The result is the corrupt file
I am working with Don Cursio and Dragos Cojocari on this

Hi Edgar,


Thank you for inquiry. I’m afraid. I could not reproduce this problem on my side while using following code snippet:

File file = new File(“c:/temp/test090/traceability±+original.dot”);<o:p></o:p>

FileInputStream input = new FileInputStream(file);<o:p></o:p>

Document doc888 = new Document(input);<o:p></o:p>

doc888.save(“c:/temp/test090/Output.dot”, LoadFormat.DOT);



I have attached output DOT file for your reference. In case of any ambiguity, please let me share more details regarding OS etc.


I’m using Windows 7 x64
Could it be possible that there is something wrong with my library?

Hi Edgar,


Thank you for inquiry. Could you please create a simple console application which reproduces the issue on your side and attach it here? We will take a closer look into what’s happening and provide you with some further feedback.

We’ll investigate the issue at our end and guide you accordingly.

I made some further testing on my code and it seems like the files get corrupted when I save them on the same file, if I save them to a new file they work just fine.
I updated to Aspose Words 12.0 and I’m able to reproduce this issue as well

I figured the problem … I left the FileInputStream open … thanks for your time

Hi Edgar,


Thanks for the additional information. It is perfect that you managed to resolve the problem on your side. If we can help you with anything else, please feel free to ask.

Best Regards,