Free Support Forum -

Cannot convert from "System.IO.Stream" in "GroupDocs.Viewer.Common.Func<System.IO.Stream>"


when i try to put a stream in the viewer i get following failure:

Cannot convert from “System.IO.Stream” in

I use following code in a .net framework WinForms Project:

            Stream stream = GetDocument(dokumentZuAktenzeichen.DokumentId);
            using (Viewer viewer = new Viewer(stream))
                HtmlViewOptions viewOptions = HtmlViewOptions.ForExternalResources();
1 Like


Please have a look at this sample code. This is how you load a document from stream.

This means that i have to store the stream in a file and then read it from there?


Yes. Have a look at this documentation article.

Okay, that works. Are there any plans that it could work with a stream directly?

1 Like


We’ll investigate this. Your investigation ticket ID is VIEWERNET-2593.