4 Replies Latest reply on Jul 14, 2014 7:35 AM by Test Screen Name

    Adobe Reader launched from command line flashes on screen then disappears without error

    antsbull

      Hi, we use Adobe Reader to display and print our report PDFs.  When doing a preview on-screen, we launch using similar command line to the following:

       

      cmd.exe start /C "C:\Program Files\Adobe\Acrobat 10.0\Acrobat\AcroRd32.exe" C:\Program Files\MyApp\report_output\RealisedGainsReport_3.pdf

       

      When printing without a preview we include the "/P" parameter.

       

      One of our clients has the behaviour, that their Acrobat Reader X launches itself and then flashes on screen and disappears again immediately, without displaying the PDF.  Printing is similarly broken.  We don't get any errors on the commandline, and the Reader itself displays no error dialog.  It simply flashes on screen and then disappears.

       

      Has anyone seen this behaviour?  Does anyone have any suggestions about what it might be or possible work arounds we could try?

       

      The O/S is Windows 7 32-bit,

       

      Note that I've tried pasting the commands above into a cmd.exe window on the client's machine and it gets the same behaviour.

       

      Thanks for any help!

        • 1. Re: Adobe Reader launched from command line flashes on screen then disappears without error
          pwillener Level 8

          I have not used such command line things for a long time.  However, two things strike me immediately

          1. the last item (parameter) should probably also be in double quotes
          2. I do not know what the /C option is... start /? does not document it
          • 2. Re: Adobe Reader launched from command line flashes on screen then disappears without error
            tschrnr

            I've seen this behavior when attempting to print from command line. The PDF file may contain features not supported in Adobe Reader. In this case, Adobe Reader behaves as you have described. I have not tried trapping for an errorlevel in the command window.

             

            I cannot get Adobe Reader to print in quiet mode (as in your /p example) while retaining page scaling. The page prints larger than the margins, effectively ruining page formatting.

            • 3. Re: Adobe Reader launched from command line flashes on screen then disappears without error
              tigray

              I know this is an older post, but I came across a similar problem today. 

                   Starting: %ProgramFiles%\Adobe\...\AcroRd32.exe /N filename.pdf 

              just flashed the screen.

               

              I had recently installed Acrobat on this machine, so I switched to start Acrobat.exe instead and all is fine.

               

              I still see AcroRd32.exe under the Acrobat installed folder, so not sure why AcroRd32.exe doesn't work, but now my BATCH command first looks for Acrobat.exe and executes it if it's present, otherwise it looks for AcroRd32.exe and executes it.

               

              set ADOBE_EXE=

              for /f "usebackq tokens=1* delims=" %%I in (`dir "%ProgramFiles(x86)%\Adobe\Acrobat.exe" /s /a /b`) do @set ADOBE_EXE=%%I

              if not "%ADOBE_EXE%"=="" goto OPEN_PDF

              for /f "usebackq tokens=1* delims=" %%I in (`dir "%ProgramFiles%\Adobe\Acrobat.exe" /s /a /b`) do @set ADOBE_EXE=%%I

              if not "%ADOBE_EXE%"=="" goto OPEN_PDF

              for /f "usebackq tokens=1* delims=" %%I in (`dir "%ProgramFiles(x86)%\Adobe\AcroRd32.exe" /s /a /b`) do @set ADOBE_EXE=%%I

              if not "%ADOBE_EXE%"=="" goto OPEN_PDF

              for /f "usebackq tokens=1* delims=" %%I in (`dir "%ProgramFiles%\Adobe\AcroRd32.exe" /s /a /b`) do @set ADOBE_EXE=%%I

               

              :OPEN_PDF

              jar -xf %JARFILE% %PDFNAME%.pdf

              "%ADOBE_EXE%" /N %PDFNAME%.pdf

              erase %PDFNAME%.pdf >NUL 2>&1

              • 4. Re: Adobe Reader launched from command line flashes on screen then disappears without error
                Test Screen Name Most Valuable Participant

                If there are spaces in the filename, quotes around the filename are now mandatory rather than just recommended.