We have a Word document that we read and save in C# like this:
using (var doc = WordprocessingDocument.Open(docStream, true, GetOpenSettings()))
{
var x = doc.MainDocumentPart.Document.Body; **// Without this code line it works!**
doc.Save();
}
The Word document contains a checkbox field.
It looks like this:
WordDocumentWithASimpleCheckbox.png (534 Bytes)
After save(), the document cannot be converted neither by GroupDocs.Conversion nor by Online-Converter Online File Conversion | Free GroupDocs Apps
It seems, that GroupDocs cannot convert a regular document if it looks like “OpenXml_corrupt.png” below:
OpenXml_original.png (16.7 KB)
OpenXml_corrupt.png (14.5 KB)
But this is a valid OpenXml document saved by Microsoft NuGet “DocumentFormat.OpenXml” V2.16.0
Attachments:
OpenXmlDocumentsAsXml.zip (2.9 KB)
See also:
Testproject.zip (1.7 MB)
image.png (534 Bytes)
Testdokument_repaired.docx (11.9 KB)
Testdokument_corrupt.docx (11.5 KB)
Testdokument_original.docx (11.8 KB)
OpenXmlDocumentsAsXml.zip (2.95 KB)
image.png (14.5 KB)
image.png (16.7 KB)
Testproject.zip (1.70 MB)