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

Free Support Forum - groupdocs.com

Docx to pdf - Cannot convert. The file is corrupt or damaged

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!**

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 https://products.groupdocs.app/conversion/total

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


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)


We are investigating this issue. Your investigation ticket ID is CONVERSIONNET-5280.

The issues you have found earlier (filed as CONVERSIONNET-5280) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov