In my c#.net application I just want to open a pdf or document in a win form.
Is it possible to open a Pdf reader or word processor
through winform
?
Asked
Active
Viewed 5,984 times
3

Nithesh Narayanan
- 11,481
- 34
- 98
- 138
-
Do you want to open it in its native app (pdf viewer or MS Word) or do you want to display it in a control on your windows form? – Derek Tomes Mar 06 '12 at 12:17
-
@Derek: using native app – Nithesh Narayanan Mar 07 '12 at 05:29
3 Answers
5
Process mydoc= new Process();
mydoc.StartInfo.FileName = "path to pdf or word file c:\a.doc";
mydoc.Start();

PraveenVenu
- 8,217
- 4
- 30
- 39
4
This is probably what you are after:
Process.Start("myfile.pdf");
You can read about it in the MSDN http://msdn.microsoft.com/en-us/library/53ezey2s(v=vs.80).aspx

Derek Tomes
- 3,989
- 3
- 27
- 41
1
You could do this trick using the WebBrowser
control:
WebBrowser1.Navigate("file:///C:/file.pdf")

ionden
- 12,536
- 1
- 45
- 37