View PDF in Winform application?

In my opinion, the best way is to actually view it outside of the WinForms app by using whatever the user has chosen to be their default PDF viewer.
 
WebView2 control (the new "WebBrowser" control) can be used to display a pdf.
 
In my opinion, the best way is to actually view it outside of the WinForms app by using whatever the user has chosen to be their default PDF viewer.

Its proberbly the best way but I am displaying all other files in the application so it would have been nice .
 
If all your users are guaranteed to have a specific component installed, e.g. Adobe Reader, then you could use that. Otherwise, I agree with @JohnH that the WebView2 control is probably the best option. That said, if it's just for displaying a PDF, you may even be able to get away with a WebBrowser control. Even if it works though, I think I'd still avoid it.
 
If all your users are guaranteed to have a specific component installed, e.g. Adobe Reader, then you could use that. Otherwise, I agree with @JohnH that the WebView2 control is probably the best option. That said, if it's just for displaying a PDF, you may even be able to get away with a WebBrowser control. Even if it works though, I think I'd still avoid it.

I ended up showing it in the deafault browser
 
Back
Top Bottom