Zip exception.Can't locate end of central directory record. Possible wrong file format or archive is corrupt.

Hai,


                using (Stream ms = new MemoryStream(bytearray of attached file))

                {

                    WordDocument wordDocument = new WordDocument(ms, Syncfusion.DocIO.FormatType.Docx, XHTMLValidationType.None );


                    Syncfusion.EJ2.DocumentEditor.WordDocument document = Syncfusion.EJ2.DocumentEditor.WordDocument.Load(wordDocument);

                    sfdt = Newtonsoft.Json.JsonConvert.SerializeObject(document);

                    document.Dispose();


                }

I used the above code to create a Syncfusion document. But is throwing this error '

Zip exception.Can't locate end of central directory record. Possible wrong file format or archive is corrupt'

I created this file on Microsoft Word document.


Attachment: Sample_File_164b3ff2.zip

1 Reply

SK Selvaprakash Karuppusamy Syncfusion Team June 22, 2023 03:51 PM UTC

Hi Pooja,


We were unable to reproduce the reported issue, and we have attached the sample we used to try to replicate the issue. Please refer to the attached sample; if the issue is replicated, modify the attached sample to reproduce it and send it back. Thereby, we will analyze further and provide you with the appropriate solution at the earliest.


Regards,

Selvaprakash K


Attachment: DocumentEditorCoreSample_b8a9dc57.zip

Loader.
Up arrow icon