Loading documents from different sources

GroupDocs.Viewer also enables you to render of remotely located documents. The rendering of the document would be similar to Load document from Stream. In order to render a remotely located document, below steps can be followed.

  • Specify the method to obtain remotely located document stream;
  • Pass method’s name to Viewer class constructor.
public static void LoadDocument()
   Stream stream = GetFileStream();
   using (Viewer viewer = new Viewer(stream))
       HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();

private static Stream GetFileStream()
    //TODO: return the stream