views:

1250

answers:

3

Hello,

I'm wondering what's the best option to display a pdf/doc document inside form in my c# winforms app.

This control should only allow do display preview. Edtiting documents should be forbidden.

I'm looking for free solution.

The best option would be to attach a few separate *.dlls to solution but it's not a requirement.

+3  A: 

I wrote something that can do this for Word Documents by taking advantage of the WebBrowser control for WinForms. Hopefully it might do you some good:

http://blog.davemorton.net/2008/10/simple-docbrowser-control.html

David Morton
Interesting workaround :)
tomo
A: 

An often suggested solution is to use a webbrowser component inside the form that views the PDF: MSDN

Another approach is to use an ActiveX Control included with the Adobe Acrobat Reader but therefore you need a license from Adobe.

BloodySmartie
+1  A: 

You can use Preview Handlers. There is a WPF Article over at CodeProject, which should be dead easy to translate to WinForms if you need it.

Jonathan C Dickinson
It looks nice but I'm afraid of compatibility issues...
tomo