加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

C# WinForm打开PDF文件并在窗体中显示

发布时间:2020-12-15 05:54:53 所属栏目:百科 来源:网络整理
导读:1.添加引用 工具箱---右键---选择项--COM组件--Adobe PDF Reader 2.使用方法 复制代码 代码如下: OpenFileDialog openFile=new OpenFileDialog(); open..Filter = "PDF文件|*.pdf"; openFile.ShowDialog(); axAcroPDF1.src = openFile.FileName; //axAcroPDF

1.添加引用

工具箱---右键---选择项--COM组件--Adobe PDF Reader

2.使用方法

复制代码 代码如下:

OpenFileDialog openFile=new OpenFileDialog();
open..Filter = "PDF文件|*.pdf";
openFile.ShowDialog();
axAcroPDF1.src = openFile.FileName;
//axAcroPDF1.LoadFile(of.FileName);   //使用方法二

除了这种方法,网上还有一些开源的项目,可以直接打开PDF文件,大家也可以参考下

http://www.codeproject.com/KB/silverlight/BlendPDFwithSilverlight.aspx

http://www.codeproject.com/KB/applications/PDFViewerControl.aspx

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读