3 Replies Latest reply on Jan 3, 2012 11:29 AM by gkaiseril

    Need a command line switch to close Acrobat Catalog Index batch file

    pcutrone Level 1

      I am looking for help with a command line switch.  I am VERY new to scheduling tasks and writing scripts.

       

      Our office created an Acrobat Catalog Index that needs to be updated on a regular basis.  I created a .bpdx file as follows:

      \\dept\SPDintelshare\Analysis\2nd Hand Transaction Logs\Secondhand Transaction Logs.pdx /rebuild

       

      This runs via Microsoft Task Scheduler from a .bat file as follows:

      "C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe" "C:\Documents and Settings\cutrone0999\Desktop\PawnIndex.bpdx"

       

      The batch runs just like it is supposed to, but it won't close when it is finished re-building.  I have tried using EXIT at the end of the .bat file and that doesn't work.  I also tried a force close for acrobat.exe and that doesn't work either.  The problem is that if I log off my computer the batch will run as scheduled and when I log back on in the morning the scheduled task shows 'running' and I have to end it.  Then I have to re-start my computer or I can't open any Adobe documents.

       

      If I leave my computer logged on, the batch runs as scheduled and when I log back on in the morning I have to close the dialog boxes showing the index re-ran and then close Adobe.

       

      I would appreciate any suggestions.  I have googled this every way I can think of and I'm not finding any results that are helpful.  Thank you in advance!

       

      Paula Cutrone

      Lead Crime Analyst

      Onondaga Crime Analysis Center

      Syracuse, NY

        • 1. Re: Need a command line switch to close Acrobat Catalog Index batch file
          Bernd Alheit Adobe Community Professional & MVP

          Adobe Acrobat isn't designed for the use in a scheduled task.

          • 2. Re: Need a command line switch to close Acrobat Catalog Index batch file
            davidcormie

            Paula,

            According to what I have found on this (including this thread which you've already found), what you are trying to do is exactly how acrobat is supposed to work with bpdx files, so Bernd's post is incorrect on this point. I haven't found a way of doing it yet but will get back to you if I am lucky.

            Regards

            David

            • 3. Re: Need a command line switch to close Acrobat Catalog Index batch file
              gkaiseril MVP & Adobe Community Professional

              Acrobat can be opened by a Windows batch process, but a Windows batch process can not trigger a batch process/Action within Acrobat.  It is possible with MacIntosh's Apple Script to open a PDF and run Acrobat JavaScript but not interact with Acrobat's Batch Processing or Acrobat's Actions. Note that opening a BPDX file is different than opening an Acrobat Seq file.

               

              The catalog/index scheduled update is not part of Acrobat "Batch Process" or "Action". The running of rebuilding of the catalog/index is controlled by the values within the  BPDX file. So if one opens the  BPDX file with Acrobat and a catalog/index is scheduled to be rebuilt or past the scheduled date and time, then the catalog/index build is submitted for precessing by Acrobat..

               

              Now the issue is how to close Acrobat after this processes has completed. Since Acrobat does not communicate with the Windows OS system, the Widows scheduled process has no way to know when this task has completed. Even though one can use JavaScript to test the status of a submitted Catalog/Index build/rebuild there is no communication of the submitted catalog job unless quired by Acrobat JavaScript. If you check the Acrobat JS API Reference you will see there are 2 possible results for a catalog/index rebuild, a completed rebuild and a termination with errors. One of these should require additional action.

               

              Further, a recent update to Acrobat JavaScript has added restrictions to using JavaScript to "closeDoc" method which may need to be addressed.

               

              It is also possible to open an FDF file and add/run JavaScirpts within a PDF, and again this is different than running a "Batch Process"/"Action" in Acrobat.