Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.58/5 (5 votes)
hiiii Friends....
Could anyone help me how to display contents of .pdf or .docs file on to a Windows Form Control.
Main intention is to just read the content, but shdn`t be allowed to write,edited and downloaded.

Thanks & Regards
Sandy
Posted

For pdf you can;

C# Forms has Adobe PDF Reader component (in COM Component tab) implemented already if you have installed the Adobe Reader. So you need to add the control to your tool explorer. To do this;

*Tool->Choose Toolbox Items.
*Select the COM Components tab.
*Select - > Adobe PDF Reader
*Drag and drop it like any other control.

-Or-

Use PDFSharp[^]

For .docs;

Word Control for .NET[^]

By using webbrowser control to open a word doc[^]

Create and open word documents by using c#[^]
 
Share this answer
 
Comments
Orcun Iyigun 11-Sep-15 10:33am    
You are talking vaguely. You have to give some details. And do you know the magic tool called debugger? Have you used a breakpoint walk through your code?
Abhinav Hiwanj 11-Sep-15 11:32am    
does it work in WPF application
you can also use WebBrowser Control of .Net
 
Share this answer
 
You can use Window WebBrowser control to do such kind of thing..

WebBrowser1.Navigate("file:///C:/file.pdf")
 
Share this answer
 
v2
Comments
Manfred Rudolf Bihy 28-Nov-13 7:24am    
So how is this a better or more relevant answer than solution #2?
Another thing I should mention is that it is over two years old.

What are trying to pull off here?
Member 11485102 8-Sep-15 1:45am    
can i hide pdf options like save,print and all other options after navigating pdf to web browser control..


Thanks
uday.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900