Free Support Forum -

Issue: I want to be able to display the document in the browser without having to download it


We’re investigating this scenario. Your investigation ticket ID is VIEWERNET-2657. As there’s any update, you’ll be notified.


You have to pass stream factory instead of stream in order to make the code work:

attachmentStream = new MemoryStream(attachment.Content);
using (Viewer viewer = new Viewer(() => attachmentStream))
    HtmlViewOptions viewOptions = HtmlViewOptions.ForExternalResources();

Let us know if it works. You may explore this (86.2 KB) application.