Free Support Forum - groupdocs.com

Document rendering to HTML in .NET

Hi,

I followed this article to build a SharePoint document viewer
http://groupdocs.com/docs/display/viewernet/How+to+Build+a+SharePoint+Document+Viewer+Using+GroupDocs.Viewer+for+.NET


The main document can be viewed on the viewer. However, the thumbnails cannot be displayed (please see the attached file 01.png)

I tried to copy a thumbnail URL and paste it on browser. The browser shows 403 FORBIDDEN (please see the attached file 02.png)

I'm using the GroupDocs.Viewer v2.10.0

Any help will be appreciated?
Thanks

Hello,


We are sorry to hear that you have such issue. This bug related to the SharePoint security system. If you try to open pdf document instead docx or doc document the thumbnails will be shown. This issue happens only with word documents since the thumbnails uses images. To resolve the issue try to use .UseHtmlBasedEngine(true, true) instead .UseHtmlBasedEngine(true) in the GetInlineDocumentScript method.

Please notify us with the results.

Tried to use UseHtmlBasedEngine(true, true), cannot solve the problem.


Tried to use UseHtmlBasedEngine(true, true, true), the problem has been solved.

Thanks for your reply.

Hello,


Thank you for the notification. We glad to hear that the issue is resolved and all works fine for you.

Thank you.

I am using version 20.4. and SharePoint 2013. I am getting the same error for GetDocumentHtml -> Gethandler.GetPages(filename, options). Hoping for your immediate assistance

@jvocuenca

We’d recommend you to use our latest ASP.NET MVC project. This is an open-source project. Hence, you can amend it as per your needs/requirements.

Please make sure that you are using GroupDocs.Viewer for .NET version 20.4 in your application. Because v20.4 follows this code example getting HTML representation.
API allows you to load document from different sources. In your case (if you are getting the source document as a stream) you may find load document from stream helpful.

This is okay now thanks God. I found resolution for this through another post here. Adding UseCache = true in the code below solved the issue.

ViewerConfig cfg = new ViewerConfig
{
StoragePath = _storagePath,
CachePath = _cachePath,
//UseCache = false
UseCache = true
};

Thank you very much.

1 Like

@jvocuenca

You’re welcome.