Just opening and then saving Flat OPC XML file in Aspose's Java API modifies contents of the file

Just opening and then saving Flat OPC XML file in Aspose’s Java API modifies contents of the file, i.e. there are some new control chars inserted in the newly created file that wasn’t present in the original file. I’m including with this message: original Flat OPC file (original.xml), saved copy of that file (copy.xml) and source code of program that was used to produce copy of the file (FlatOPCDocumentOpenSaveTest.java)

Best regards,
Ivan Tanaskovic

Hi Ivan,


Thanks for your inquiry. Could you please also attach a comparison screenshot showing the difference(s) in original.xml and copy.xml here for our reference. We will investigate the issue further on our end and provide you more information.

Best regards,

Hi Awais,

I’ve already included both xml files with my original post because I believed that opening them (and comparing them) in any hex editor/viewer shouldn’t be too much of the problem.
Anyway, just for your convenience (and on your specific request) I’m including screen captures of those two files opened in one such hex editor/viewer; please observe just first few bytes of both files and you’ll immediately spot the first difference between two documents. There is large number of differences similar to that first one, and they occur throughout the copy.xml document.
Without even opening any of the attached files one can tell just from difference of file sizes between two documents (6917 bytes/characters to be exact) that there is significant difference between them.
I hope that this time you’ll find more time on your hands to deal with this issue.

Best regards,
Ivan Tanskovic

Hi Ivan,


Thanks for the additional information. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11238. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hi Ivan,


Regarding WORDSNET-11238, our development team has completed the work on your issue and has come to a conclusion that this issue and the undesired behaviour you’re observing is actually not a bug in Aspose.Words. So, we will close this issue as ‘Not a Bug’.

This is because we provide no guarantees on ‘internal structure’ of the document. Aspose.Words can change the ‘internals’ of the file while trying to maintain the original look and retaining format and content as close to the original as possible. If you open and save this document using MS Word, it will change the binary content as well. So this is normal and not a bug.

If we can help you with anything else, please feel free to ask.

Best regards,