open a pdf file at a specified page in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dorinda
    New Member
    • Oct 2011
    • 5

    #1

    open a pdf file at a specified page in C#

    I have to open a help pdf file at a specified page in C# in windows form,

    I tried this link,

    http://bytes.com/topic/c-sharp/answers/459446-open-pdf-file-specified-page-c

    Process myProcess = new Process();
    myProcess.Start Info.FileName = "Acrobat.ex e";
    myProcess.Start Info.Arguments = "/A \"page=2=OpenAc tions\"C:\\TEMP \\Modified_User _Manual_Ch1-3.pdf";
    myProcess.Start ();

    I am getting an error says "The system cannot find the file specified" in myProcess.Start ();

    Do i have to install Acrobat.exe to execute this code.

    Need hlp ASAP.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    When you call that code, you are telling it to go and start the process "acrobat.ex e" which means that file must exist on your file system. So in short, yes, you need to install acrobat, otherwise you'll get the exact error that you're getting ;)

    Comment

    • Dorinda
      New Member
      • Oct 2011
      • 5

      #3
      Hi Gary,
      Thanks for your prompt response.

      Is there any trial version of acrobat.exe available. I did some research. i couldn’t find one.

      Is there any other way to achieve this behavior in Windows form. I have to open a help file using specific chapter or bookmark or page.

      Need help ASAP.

      Dorinda

      Comment

      • GaryTexmo
        Recognized Expert Top Contributor
        • Jul 2009
        • 1501

        #4
        If you just want to view the PDF, why don't you use the free reader?

        Here's a link to Adobe Reader...
        Download free Adobe Acrobat Reader software for your Windows, Mac OS and Android devices to view, print, and comment on PDF documents.


        It looks like the executable name is acrord32.exe.

        As for a free version of acrobat, check adobe's page. Otherwise I don't know. Sorry!

        Comment

        • Dorinda
          New Member
          • Oct 2011
          • 5

          #5
          Thanks you so much. That realy helps.

          Comment

          • Dorinda
            New Member
            • Oct 2011
            • 5

            #6
            Hi Gary,

            Is it possible to open the PDF using Bookmark instead of Page number?

            Thanks.
            Dorinda

            Comment

            • GaryTexmo
              Recognized Expert Top Contributor
              • Jul 2009
              • 1501

              #7


              That's the doc for a PDF's open parameters. Apparently you can use the nameddest parameter to specify the bookmark.

              Comment

              • Dorinda
                New Member
                • Oct 2011
                • 5

                #8
                Hi Gary,
                To create the nameddest, I opened the pdf in acrobat(trial), i don' t see any deatination tab in Navigation Panel(View > Navigation Panels)
                Is there any other way to set namedest parameter.
                Dorinda.

                Comment

                Working...