This project has moved. For the latest updates, please go here.

Compatibility with OpenOffice and LibreOffice

Oct 29, 2014 at 2:36 PM
Whatever I do with DocX is fine when viewing it with Microsoft Office Word.

But OpenOffice just butchers everything and LibreOffice while not butchering it doesn't display some things I did that were appearing on MS Word.

Does anyone know why this happens? XML problems?

How can I make it compatible?
Oct 29, 2014 at 4:47 PM
As an example I add an image to a paragraph.

I go to MS Word i can see it correctly inserted.

I go to LibreOffice just white space.
Nov 3, 2014 at 8:57 PM
I got the same problem.
Google Docs even dont open this files..
Is any way to fix that??
Jun 18, 2015 at 12:21 PM
Old thread but its the first one i read when i got this problem.

I found one way to fix, maybe not the best solution but works well.

with OpenXml to simplify xml structure.

It affects "document.xml" realy simplify it.
var settings = new SimplifyMarkupSettings
                {
                    RemoveComments = true,
                    RemoveContentControls = true,
                    RemoveEndAndFootNotes = true,
                    RemoveFieldCodes = false,
                    RemoveLastRenderedPageBreak = true,
                    RemovePermissions = true,
                    RemoveProof = true,
                    RemoveRsidInfo = true,
                    RemoveSmartTags = true,
                    RemoveSoftHyphens = true,
                    ReplaceTabsWithSpaces = true,             
                };

                using (WordprocessingDocument wordDocument = WordprocessingDocument.Open(docxMemoryStream, true))
                {
                    MarkupSimplifier.SimplifyMarkup(wordDocument, settings);
                }
Hope it helps!