Sai*_*thi 31
我认为最简单的方法是使用Adobe PDF阅读器COM组件
我希望这有帮助
ArB*_*rBR 29
您可以通过interop 使用System.Diagnostics.Process.Start以及WIN32 ShellExecute函数,以使用默认查看器打开PDF文件:
System.Diagnostics.Process.Start("SOMEAPP.EXE","Path/SomeFile.Ext");
[System.Runtime.InteropServices.DllImport("shell32. dll")]
private static extern long ShellExecute(Int32 hWnd, string lpOperation,
string lpFile, string lpParameters,
string lpDirectory, long nShowCmd);
Run Code Online (Sandbox Code Playgroud)
另一种方法是将WebBrowser控件放入表单,然后使用Navigate方法打开PDF文件:
ThewebBrowserControl.Navigate(@"c:\the_file.pdf");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
104665 次 |
| 最近记录: |