Opening a pdf in c# at specific bookmark

陌路散爱 提交于 2019-12-24 07:07:26

问题


I have a existing pdf which i want to open at specific bookmarks in c#. Below is the snippet of code i'm using

string filepath = Common.executivePath.ToString() + @"\helpfile.pdf";
myProcess.StartInfo.FileName = "C:\\ProgramFiles\\Adobe\\Reader10.0\\Reader\\AcroRd32.exe";
myProcess.StartInfo.Arguments = "/A \"nameddest=Flexible Pavement Design\"  " + filepath;
myProcess.Start();

If the bookmark is a single word (i.e no spaces it works fine) it works fine.

myProcess.StartInfo.Arguments = "/A \"nameddest=Preface\"  " + filepath;

Here the name of the bookmark is "Preface". Also if bookmark is nested inside another, that is also not working(i'm not sure about the syntax here).

myProcess.StartInfo.Arguments = "/A \"nameddest=Preface/Disclaimer"  " + filepath;

Is there any other attribute other than arguments i should use to make it work?

来源:https://stackoverflow.com/questions/10168185/opening-a-pdf-in-c-sharp-at-specific-bookmark

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!