Free Support Forum - groupdocs.com

Corrupted or damaged file exception


#1

get this exception while reading the file from the local path.
I can able to get the list of files in the folder, but when i am trying to get list of PageHtml from a single file i am getting this error. can you please help me on this.


#2

@gwkravi,

Thanks for contacting support.

Please share with us the following details so that we can investigate your reported issue at our end.

  • Platform (.NET or Java) and version of GroupDocs.Viewer you are using
  • Problematic document for which you are getting the exception
  • Complete source code that you are using to get HTML representation of the document

We shall be looking forward to hearing from you.


#3

Hi Usman,
below are the details

  1. we are using Visual Studio 2017 & GroupDocs.Viewer Ver 19.2.0
  2. A simple word document (https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/blob/master/Examples/Data/Storage/word.doc)
  3. Code : // Set viewer configuration
    ViewerConfig config = new ViewerConfig();
    config.StoragePath = @“E:\storage”;
    // Initailize ViewerHandler
    ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
    var files = htmlHandler.GetFileList();
    // Get Html pages
    List pages = htmlHandler.GetPages(files.Files[0].Guid);
    //List pages = htmlHandler.GetPages(“word.doc”);

#4

@gwkravi,

Thanks for your response.

We are unable to reproduce your reported issue using your provided details. Would you please share with us a standalone sample application (source code without compilation errors) that can be used to reproduce the issue at our end?


#5

Hi Usman,
I am uploading the application, Please look into the issue.GroupDocs.Viewer.WebApp.zip (1.0 MB)


#6

@gwkravi,

Thanks for your response.

We have tested your provided web application and managed to reproduce the issue at our end. We have logged this issue in our Issue Tracking System as VIEWERNET-1903 for further investigation. We shall keep you notified in case of any updates.


#7

@gwkravi,

We have got the updates regarding your reported issue.

The web application you have shared with us is targeting .NET Core Framework and at the moment, GroupDocs.Viewer for .NET is not available for .NET Core. The application can be built successfully but it is expected that it will throw exceptions at run-time as .NET Core does not provide the API which GroupDocs.Viewer relies on for rendering documents. Your application can be run successfully in case it targets .NET Framework. For reference, please download this application.