Below is a clever sample implementation to load PDF documents in a programmatically-created browser window in WPF, without having to wrap the Acrobat Reader ActiveX control in a WindowsFormsHost control.
The original posting is here, scroll down to the contribution of user “Agency30″ for the part I am discussing.
According to the MSDN documentation, the implementer should call HttpListener.Close(), which is the wrapper for IDisposable.Dispose, but it functions as it is written. One could refactor the original sample into a re-usable component and address things like resource management.
This method, of course, relies on the presence of Adobe Reader on the user’s system. I’ve gotten it to work successfully using Reader 11.0.1 on Windows 7.
Filed under: C#, XAML Tagged: Acrobat Reader, Browser Object, HttpListener, PDF, WPF
