本文介绍了通过Windows应用程序打开PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我正在创建Windows应用程序,我想通过编码打开并阅读PDF文件。在浏览按钮上单击我选择要打开的pdf文件,那么使用哪个控件?请回复。
HiI am creating windows application in which i want to open and read PDF file through coding.On browse button click i select the pdf file to open,so which control is used for this? reply please.
推荐答案
// Code snippet...
string pdfFilePath= "C:\MyLocation\My.pdf";
var start = System.Diagnostics.Process.Start(pdfFilePath);
start.EnableRaisingEvents = true;
start.Exited += delegate (object sender, EventArgs e)
{
// You can even do something when the PDF application closes
}
当然,这取决于您是否可以将要求更改为不需要在应用程序中嵌入PDF查看控件。
Of course this depends on whether you can change your requirements to not require embedding a PDF viewing control within your application.
这篇关于通过Windows应用程序打开PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!