3 Replies Latest reply on Feb 27, 2014 6:01 AM by try67

    Strange Error while running Batch Sequence (Acrobat XI Mac)

    NoPrevaricator Level 1

      I am running a Javascript on an admittedly large PDF (in excess of 250 pages).  This Javascript is essentially grabbing all the text on a page and putting it in a text file with some added information.  The data is later used for a kind of browser index.

       

      One of my operators decided to stress-test the script, hence the large number of pages in the PDF.  About halfway through she gets the following error message:

       

      Raise Error : Cos document table full

      Report.Report : 2 Batch Undefined : Exec

       

      This does not stop the script but the expected text file never materializes.

       

      I have made a search of the documentation and though there are lots of references to Cos objects, Cos streams, cos layers and a whole lot more, I found nothing on a Cos document table, what it meant for that table to be full, and how to resolve the problem.

       

      Can anyone help me with an explanation for what the above means and how I should address it?

       

      TIA!

      John

        • 1. Re: Strange Error while running Batch Sequence (Acrobat XI Mac)
          try67 MVP & Adobe Community Professional

          Acrobat is not very good when it comes to processing large amounts of files

          using an Action and a script. It tends to choke at some point, or produce

          weird errors. Unfortunately, this has gotten worse with the later versions

          of Acrobat, especially XI.

           

          I have never encountered this specific problem, but are you using a Report

          object to create the text file? If so, I would recommend against it. I

          would try keeping the text in memory in a variable and at the end of the

          batch process to output it directly to a text file.

           

           

          On Wed, Feb 26, 2014 at 11:26 PM, NoPrevaricator

          • 2. Re: Strange Error while running Batch Sequence (Acrobat XI Mac)
            NoPrevaricator Level 1

            Thank you, Gilad for your input. 

             

            Actually, what I am doing is this to create the text file:

             

            function DoEndJobStuff()

            {

               var MyStringLength = global.MyObjects.length;

             

               var MyString = "var mydata = \'[";

             

               for(var a = 0; a < MyStringLength; a++)

               {

                   if(a > 0)

                      MyString += ",";

                  

                   var MyData = global.MyObjects.pop();

                   MyString += MyData.MakeMyStatement();

               }

               MyString += "]\';";

             

               this.createDataObject("TextWells.txt", MyString);

               this.exportDataObject({cName: "TextWells.txt", nLaunch: 0});

            }

             

            If there is a more direct way to write text to a straight text file from Acrobat using Javascript, I could not find it in the API and would greatly appreciate it if you  shared a snippet of code with me that demonstrates how.

            • 3. Re: Strange Error while running Batch Sequence (Acrobat XI Mac)
              try67 MVP & Adobe Community Professional

              No, that's a good method... Perhaps there's a limit to the size of the

              Global object, or something like that.