We have an office online server build 16.0.8471.8525 (latest and greatest) which we use for displaying and editing word documents through WOPI. When editing a document which has a pretty header and footer representing a formal law document, it gets corrupted. It can be used for editing with no problem with our office server but viewing in it as well as in desktop word is not possible, even desktop word can not repair it.
Editing the same doc in office 365 online or desktop word does not corrupt the file.
Making the same change to the document with our office online server, office 365 online and desktop word produces 3 completely different files in therms of internal xml representation (viewing with Open XML SDK 2.5 for Microsoft Office) and its not trivial to figure out why is the file broken.
I'm struggling to find the correct approach for solving the problem