打开PDF:WPF [英] open a PDF : WPF
本文介绍了打开PDF:WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在点击一个按钮打开一个PDF文件。我会继续该项目的解决方案/命名空间中的PDF文件。谁能给我解决方案呢?
I want to open a PDF file in a button click. I'll keep the PDF file within the solution/namespace of the project. Can anyone give me solution for this?
推荐答案
要启动标准的PDF阅读器,你可以简单地启动外部进程:
To start the standard PDF viewer you can simply start an external process:
Process proc = new Process( );
proc.StartInfo = new ProcessStartInfo( ) {
FileName = path //put your path here
};
proc.Start( );
要显示你的应用程序内的文件,你必须使用PDF阅读器作为一个ActiveX组件。
To show the file inside your application you have to use the pdf viewer as an ActiveX-component.
这篇关于打开PDF:WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文