Free Support Forum -

Preview takes more Loading time


Hii ,

Please go through attachment files.



Thank you for the request. Could you please provide more info about the issue. Please share with us next:

1. Version of the GroupDocs library.
2. Rendering mode
3. Browser and it’s version
4. Example of the widget code

Thank you.


File preview works fine for all files but takes more time to preview for particular file which is attached in previous post i think there are some issue in file .Please go through following data :

Version : -1.8.0

.Stream((Stream)ViewBag._Stream, ViewBag._File)
.AreaToolOptions(new Groupdocs.Web.Annotation.DrawingOptions { PenWidth = 1, DashStyle = Groupdocs.Common.DashStyle.Solid, PenColor = 0xFF0000,BrushColor=16776960 })
.PolylineToolOptions(new Groupdocs.Web.Annotation.DrawingOptions { PenWidth = 1, DashStyle = Groupdocs.Common.DashStyle.Dash, PenColor = 0xFF0000 })
.ArrowToolOptions(new Groupdocs.Web.Annotation.DrawingOptions { PenWidth = 1, DashStyle = Groupdocs.Common.DashStyle.Solid, PenColor = 0xFF0000 })



Thank you for the example. First of all please update your library with the latest version. Then please remove .Stream or .FilePath property because you can’t use both of them in the same time.

To speed up first loading of the document you can do next: generate document cache before it will be requested by the Annotation library. For how to do that please check this code example:
string url = string.Empty;
HttpRequest request = HttpContext.Current.Request;
url = “http://” + request[“HTTP_HOST”] + “/”;
Groupdocs.Web.UI.DocumentCache cacheDocument = new Groupdocs.Web.UI.DocumentCache(null, Server.MapPath("~/App_Data"),
cacheDocument.GenerateImages(_filePath, null, null, 100);

The idea is next: lets say you (or user) uploads the document which will be annotated. Just after it was uploaded (in the same method) you will generate it’s cache with the code that I shared. And then when user will open it for annotating - Annotation will not take a time for the cache generating. As a result loading time should be reduced.

Thank you.



please go through screen shot


Hi again,

Thank you for the screenshot. To resolve the issue simply update the code line with the error with such one: HttpRequest request = System.Web.HttpContext.Current.Request;

Best regards.