New to Telerik Document ProcessingStart a free 30-day trial

How to Resolve InvalidDataException Central directory header is broken

Updated over 6 months ago

Environment

VersionProductAuthor
2024.1.124RadWordsProcessingDesislava Yordanova

Description

The following exception may occur when trying to import a DOC file using RadWordsProcessing:

InvalidDataException

Solution

To resolve this issue, please follow these steps:

  1. Make sure that you are using the correct format provider for importing the DOC file. Use the DocFormatProvider instead of the DocxFormatProvider for importing the DOC file.

  2. After importing the document, if you need to export it as a DOCX file, use the DocxFormatProvider.

By following these steps, you should be able to import the DOC file without encountering the InvalidDataException.

See Also