thijs1095 thijs1095 - 1 year ago 155
C# Question

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";

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!


Ted Ted
Answer Source


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

changing n to the page number you want

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download