Open a specific page in a PDF file c#

后端 未结 5 1259
伪装坚强ぢ
伪装坚强ぢ 2021-01-15 19:41

I open a pdf file when my form is loaded with the following code:

Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
proce         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-15 20:08

    Checkout this : http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

    It explain what arguments Adobe Reader can receive.

    And it has a Page argument.

    Your code must be :

    Process process = new Process();
    ProcessStartInfo startInfo = new ProcessStartInfo();
    process.StartInfo = startInfo;
    startInfo.Arguments = "/A \"page=N\"";
    startInfo.FileName = @"F:\STAGE\test.pdf";
    process.Start();
    

    Where N is your page number.

提交回复
热议问题