tomo
tomo

Reputation: 1950

How to display PDF or Word's DOC/DOCX inside WinForms window?

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.

Upvotes: 11

Views: 47114

Answers (3)

ptilton
ptilton

Reputation: 132

Consider using the preview handlers for Vista, Windows 7. I used the code provided by Brad Smith (with corrections from the comments).

http://www.brad-smith.info/blog/archives/79 - Hosting Preview Handlers in Windows Forms Applications

Upvotes: 1

Jonathan C Dickinson
Jonathan C Dickinson

Reputation: 7285

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.

Upvotes: 0

dajood
dajood

Reputation: 4050

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.

Upvotes: 0

Related Questions