以下代码用于在C#中打开PDF文件的特定页面。该代码对所有Adobe版本(除了最新版本11)都有效。
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "AcroRd32.exe";
myProcess.StartInfo.Arguments = "/A \"page=2=OpenActions\" C:\\Jack and Jill.pdf";
myProcess.Start();
请问adobe reader 11有什么特别之处吗?我的文件存在,但是显示"There was an error opening this document. The file cannot be found."我已经卸载了adobe 11并安装了adobe reader 10,那时代码完全正常运行。同时,使用命令行打开Acrobat Reader 11也能正常工作并打开PDF文件。
Process.Start( _PDFFileName );
)时,它可以正常工作。 - rookie_developer