Free Support Forum - groupdocs.com

Multiple instance of Group Docs viewer

Hi,



Do we have functionality to create Multiple instance of
Group Docs viewer, i.e. it will store document at different locations for
different request parallely?<span style=“font-family: “Times New Roman”, serif; font-size: 12pt;”>

Hi Shinde,


Thanks for taking interest in GroupDocs.Viewer for .NET.

Can you please tell us the version of the API you are using? We shall be looking forward to your response.

Warm Regards

Hi Usman,


I’m using group-docs viewer version 17.1.0.0

Hi Shinde,


Thanks for your response.

Yes, you can use multiple configuration objects to initialize multiple ViewerHandlers with separate storage locations at the same time. In each object of ViewerConfig class you can set a different storage path. Following is a sample code snippet that may help you.

ViewerConfig config1 = new ViewerConfig();
config.StoragePath = “d://storage1”;
config.CachePath = “d://storage1//cache//”;

ViewerConfig config2 = new ViewerConfig();
config.StoragePath = “d://storage2”;
config.CachePath = “d://storage2//cache//”;

ViewerHandler HtmlHandler = new ViewerHtmlHandler(config1);
ViewerHandler ImageHandler = new ViewerImageHandler(config2);

In above example, the HtmlHandler is using “d://storage1” storage location while ImageHandler is using “d://storage2” as storage directory. In case of any confusion, please feel free to let us know.

Warm Regards

Hi Usman,


Thank you for the above information.

Hi Shinde,


You are always welcome.

Warm Regards