Display PDF from a stream in a WebBrowser control

2019-04-24 14:42发布

问题:

How can I display a PDF document from a MemoryStream within a WebBrowser control?

I've searched around and found I can simply navigate to a PDF file using:

webBrowser1.Navigate(@"C:\Temp\ExportedPDF.pdf");

However I want to avoid saving the file anywhere, but I'm currently leaning towards using IsolatedStorage simply because I can't find any other method to get the stream into the browser control.