打开本地文件没问题,可以直接浏览,但是打开局域网共享pdf文件时,就无法显示,等了一会儿,以为是加载慢的问题,但是还是无法显示
private void PDFView_Load(object sender, EventArgs e)
{
string fileName = MyOpenFileDialog();
axAcroPDF3.LoadFile(fileName);
//axAcroPDF3.LoadFile("C:\Users\Darcy\Desktop\Android+Development.pdf");
}
string MyOpenFileDialog()
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "PDF文档(*.pdf)|*.pdf";
if (ofd.ShowDialog() == DialogResult.OK)
{
return ofd.FileName;
}
else
{
return null;
}
}