0 Replies Latest reply on Jul 13, 2011 8:04 AM by ajones.ophiropt

    Linking to adobe reader bookmarks via C#

    ajones.ophiropt

      Hello,

        I have a pdf file that was created with bookmarks in it.  This particular document is a manual for a product we are developing.  We use this pdf document as a link to our "What's this help" in our product.  We first click the "What's this" button and then an item in our product.  As of Adobe Reader X (ARX) this is no longer working as it has in the past.  This is the process in which things should and have happened until ARX:

      1. Click the "What's this" button

      2. Click somewhere in the application

      3. Adobe Reader comes up.

      4. Adobe Reader opens the "User Manual"

      5. Adobe Reader jumps to selected bookmark.

       

      What is happening as of ARX is the following:

      1. Click the "What's this" button

      2. Click somewhere in the application

      3. Adobe Reader comes up.

      4. Adobe Reader opens the "User Manual"

      5. FAILURE! - Adobe Reader does NOT jump to selected bookmark.

       

      Nothing has changed in our code.  This worked for versions of Adobe Reader 8 and 9, but now with X it doesn't work.  Below is a code snipit of what we are doing.  Any help on the matter would be appreciated.  I have tried to put sleeps between commands to Adobe Reader but that doesn't seem to help.  I have turned off the protection mode new to ARX and that seems to help but still not consistent.

       

      Code Snipit:

      DdeClient client = new DdeClient("acroview", "control");

      try

      {

         client.Connect();

      }

      catch{}

      if (!client.IsConnected)

      {

         client = new DdeClient("acroviewr10", "control");

         client.Connect();

      }

      try

      {

         client.Execute("[DocOpen(\"" + userGuide + "\")]", 10000);

         Thread.Sleep(1000);

         client.Execute("[FileOpenEx(\"" + userGuide + "\")]", 10000);

         Thread.Sleep(1000);

         client.Execute("[DocGoToNameDest(\"" + userGuide + "\"," + bookmark + ")]", 10000);

      }