本章讲述:使用SumatraPDF.exe 查看pdf文档;
首先要下载 “SumatraPDF.exe” 程序,开源的
代码示例,调用“SumatraPDF.exe”查看pdf文档:
string exePath = System.IO.Path.Combine(Environment.CurrentDirectory, "SumatraPDF.exe");
if (!System.IO.File.Exists(exePath))
return;
string pdfPath = System.IO.Path.Combine(Environment.CurrentDirectory, "Doc", "软件帮助文档.pdf");
if (!System.IO.File.Exists(pdfPath))
return;
try
{
System.Diagnostics.Process.Start(exePath, "\"" + pdfPath + "\"");
}
catch (Exception ex)
{
}