4 Replies Latest reply on Apr 12, 2011 8:17 AM by kjsapci

    Reade X and command line

    Ashard

      I work using Windows XP SP3 and Acrobat Reader X.

      I have create a service that control a directory, when a pdf file is copy in this directory the service execute the command line “AcroRd32.exe /t FileName PrinterName”.

       

      If I start the service with the logon user when execute the command line in the task manager appears one AcroRd32 and the print execute correctly.

       

      If I start the service with a user that are different to logon user (I test with other administrative user, local service or lan service) when execute the command line in the task manager appears two AcroRd32 and don’t execute the print.

       

      The same operation with Acrobat Reader 9.x work correctly.

      I have already try to disable the Protected Mode, but the problem persist. Please could you help me?

       

      Thanks

        • 1. Re: Reade X and command line
          kjsapci

          I'm experiencing the same problem when using the /p print flag on the command line (acrord32.exe /p filename.pdf).  In my case, disabling Protected Mode and restarting adobe reader caused the issue to go away, but that is not a solution as I'm calling the command line programmatically, and cannot disable this protected mode programmatically.  This issue doesn't occur on Windows 7, but it is a big problem that it happens on Windows XP as so many people are still using XP.

          • 2. Re: Reade X and command line ==>Alternative solution
            CBrunois

            Problem  with command line  protected mode  on Windows XP PRO sp3 and adobe reader 10X

             

             

            Try to create a little console dotnet application

             

            using System;
            using System.Collections.Generic;
            using System.Text;

            namespace Adobe10CmdLine
            {
                class adobe10cmdline
                {
                    static void Main(string[] args)
                    {
                        if (args.GetUpperBound(0) == -1)
                        {
                            System.Console.WriteLine("Le nom de fichier n'est pas renseigné");
                        }
                        else
                        {
                            string fil = args[0].ToString().Replace("\\", @"\");
                            string adobepath = System.Environment.GetEnvironmentVariable("ProgramFiles")+@"\Adobe\Reader 10.0\Reader\Acrord32.exe";
                            System.Diagnostics.Process.Start(adobepath, fil);
                        }
                    }
                }
            }

             

            Compile it

            Replace command line with acrord32.exe   [myfile.pdf]     by  Adobe10CmdLine.exe  [myfile.pdf]

             

            it ld be normally  OK

             

            Christophe

            • 3. Re: Reade X and command line - Alternative solution
              CBrunois Level 1

              Problem  with command line  protected mode  on Windows XP PRO sp3 and adobe reader 10X

               

               

              Try to create a little console dotnet application

               

              using System;
              using System.Collections.Generic;
              using System.Text;

              namespace Adobe10CmdLine
              {
                  class adobe10cmdline
                  {
                      static void Main(string[] args)
                      {
                          if (args.GetUpperBound(0) == -1)
                          {
                              System.Console.WriteLine("Le nom de fichier n'est pas renseigné");
                          }
                          else
                          {
                              string fil = args[0].ToString().Replace("\\", @"\");
                              string adobepath = System.Environment.GetEnvironmentVariable("ProgramFiles")+@"\Adobe\Reader 10.0\Reader\Acrord32.exe";
                              System.Diagnostics.Process.Start(adobepath, fil);
                          }
                      }
                  }
              }

               

              Compile it

              Replace command line with acrord32.exe   [myfile.pdf]     by  Adobe10CmdLine.exe  [myfile.pdf]

               

              it ld be normally  OK

               

              Christophe

              • 4. Re: Reade X and command line
                kjsapci Level 1

                Thanks so much for the information.  I ended up solving my issue by using

                the activex control instead of the command line.  This gave me more control

                of what displayed to the user when printing, so it was a better solution in

                the end.  It took a little bit of gymnastics to make it work in WPF, but

                nothing major.

                 

                Thanks again, this would be great information to have available out on the

                web for others in the situation I was in.

                 

                Keith