5 Replies Latest reply on Nov 18, 2013 1:08 AM by try67

    Acrobat batch how to perform?

    lhb1511@qq.com Level 1

      http://forums.adobe.com/thread/302996

      I am on this page to find the relevant code,

      --------------------------------------

       

      app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Footer", cParent: "File", nPos: 20 });

       

      app.addMenuItem({ cName: "Set Date Time (Filename)", cParent: "Footer", cExec: "SetFooter(1)"});

      app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(2)"});

      app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(3)"});

       

      app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});

       

      app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});

      app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(2)"});

      app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(3)"});

       

      function SetFooter(ARG)

      {

      var re = /.*\/|\.pdf$/ig;

      var FileNM = this.path.replace(re,"")+".pdf";

      var Path = this.path;

      var AcDate = new Date();

      for (var p = 0; p < this.numPages; p++)

       

      {

       

      if (ARG==1 || ARG==3) {var fd = this.addField("xftDate", "text", p, [30,15, 290,30]);

       

      fd.textSize=6; fd.value = util.printd("yyyy/mmm/dd, HH:MM", AcDate) + " (" + FileNM +")"; }

       

      if (ARG==2 || ARG==3){var fp = this.addField(String("xftPage"+p+1), "text", p, [350,15,300,30]);

       

      fp.textSize=6; fp.value = "Page: " + String(p+1)+ "/" + this.numPages; }

       

      } }

       

      function RemoveFooter(ARG)

      {

       

      if (ARG==1 || ARG==3) {var x = this.removeField("xftDate");}

       

      if (ARG==2 || ARG==3) {for (var p = 0; p < this.numPages; p++)

       

      {

       

      var x = this.removeField(String("xftPage"+p+1)); }

       

      } }

      ---------------------------------------

      but do not know how to achieve a batch?