使用C#在Windows窗体控件上显示.pdf或.doc内容 [英] Display .pdf or .doc contents on to a Windows Form Control using C#

查看:286
本文介绍了使用C#在Windows窗体控件上显示.pdf或.doc内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hiiii朋友....

任何人都可以帮助我如何将.pdf或.docs文件的内容显示到Windows窗体控件上。

主要用途是只是阅读内容,但shdn`t允许编写,编辑和下载。



谢谢和问候

Sandy

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

推荐答案

对于pdf,你可以;



C#Forms已经实现了Adobe PDF Reader组件(在COM组件选项卡中)如果您已安装Adobe Reader。因此,您需要将控件添加到工具资源管理器中。要做到这一点;



*工具 - >选择工具箱项目。

*选择COM组件选项卡。

*选择 - > Adobe PDF阅读器

*像任何其他控件一样拖放它。



-Or-



使用 PDFSharp [< a href =http://pdfsharp.com/PDFsharp/index.php?option=com_content&task=view&id=27&Itemid=42target =_ blanktitle =New Window> ^ ]



对于.docs;



用于.NET的Word控件 [ ^ ]



By使用webbrowser控件打开word doc [ ^ ]



C使用c#创建并打开word文档[ ^ ]
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#[^]


你也可以使用.Net的WebBrowser控件
you can also use WebBrowser Control of .Net


你可以使用Window WebBrowser控件来做这样的东西..



WebBrowser1.Navigate(file:/// C:/file.pdf)
You can use Window WebBrowser control to do such kind of thing..

WebBrowser1.Navigate("file:///C:/file.pdf")


这篇关于使用C#在Windows窗体控件上显示.pdf或.doc内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆