Search code examples
c#pdfpage-numbering

Open a specific page in a PDF file c#


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

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

This works fine but now I want to open a specific page. For example page number 5 of the document test.pdf? Does any one have an idea? Tried some stuff but dind't work!

Thanks!


Solution

  • Try

    process.StartInfo.Arguments = "/A \"page=n\" \"F:\\STAGE\\test.pdf"";
    

    changing n to the page number you want