3 Replies Latest reply on Dec 17, 2008 7:51 AM by (Matt_Mendenhall)

    Bath process stopped working after upgrading from Acrobat Pro 7.1 to 8.1.3

      I have a batch process that was working in Acrobat 7.1 Professional on that no longer works when using Acrobat 8.1.3. It essentially takes a PDF sizes it down, puts a stationary behind it, watermarks it with the month and moves on to the next file. My javascript skills are not as good as I wish and I can't figure out what has changed between versions to stop it from working. The java console gives a message saying "redeclaration of the const ConvertToPA." It seems like something in the syntax has changed. Does anyone know what's changed to stop it from working? I posted the code below. Many Thanks.

      Note: Trusted functions and paths have been changed.

      if (typeof global.user_response == "undefined")
      {var cResponse = app.response({ cQuestion: "Enter the Month & Year of Published Ad (i.e. August 2008)", cTitle: "Published Ad"});

      if (cResponse == null) {app.alert("Process Cancelled"); }
      else {global.user_response = cResponse;} }

      if (global.user_response) ConvertToPA();

      function ConvertToPA() {

      var size = this.getPageBox("Media"); if ((size[0] == 0) & (size[1] == 612) & (size[2] == 792) & (size[3] == 0))
      { trustedWatermark1 (this, true, "/Macintosh HD/Path/to/stationary/stationary1.pdf", app.constants.align.left , app.constants.align.bottom , 184, 12);
      this.addWatermarkFromText ({cText: global.user_response + " Published Ad", cFont: "ArialNarrow,Bold", nFontSize: 14, aColor: [ "G", 0.5 ], bOnTop: true,
      nHorizAlign: app.constants.align.center, nHorizValue: -50.4, nVertAlign: app.constants.align.bottom, nVertValue: 20.16}); }; //

      var size = this.getPageBox("Media"); if ((size[0] == 0) & (size[1] == 792) & (size[2] == 612) & (size[3] == 0))
      { trustedAddWatermarkFlyer (this, true, "/Macintosh HD/Path/to/stationary/stationary1.pdf", app.constants.align.left , app.constants.align.bottom , 184, 12);
      this.addWatermarkFromText ({cText: global.user_response + " Published Ad", cFont: "ArialNarrow,Bold", nFontSize: 14, aColor: [ "G", 0.5 ], bOnTop: true,
      nHorizAlign: app.constants.align.center, nHorizValue: 40, nVertAlign: app.constants.align.bottom, nVertValue: 20.16}); }; //

      var size = this.getPageBox("Media"); if ((size[0] == 0) & (size[1] == 612) & (size[2] == 396) & (size[3] == 0))
      { this.setPageRotations({nRotate: 270}); this.setPageBoxes({cBox: "Media",rBox: [-90,-108,702,504]}); this.setPageBoxes({cBox: "Crop",rBox: [-90,-108,702,504]});
      trustedAddWatermark (this, false, "/Macintosh HD/Path/to/stationary/stationary2.pdf");
      this.addWatermarkFromText ({cText: global.user_response + " Published Ad", cFont: "Arial,Bold", nFontSize: 24, aColor: [ "G", 0.5 ], bOnTop: true,
      nHorizAlign: app.constants.align.center, nHorizValue: 72, nVertAlign: app.constants.align.top, nVertValue: -42}); }; //

      var size = this.getPageBox("Media"); if ((size[0] == 0) & (size[1] == 396) & (size[2] == 612) & (size[3] == 0))
      { this.setPageBoxes({cBox: "Media",rBox: [-90,-108,702,504]}); this.setPageBoxes({cBox: "Crop",rBox: [-90,-108,702,504]});
      trustedAddWatermark (this, false, "/Macintosh HD/Path/to/stationary/stationary3.pdf");
      this.addWatermarkFromText ({cText: global.user_response + " Published Ad", cFont: "Arial,Bold", nFontSize: 24, aColor: [ "G", 0.5 ], bOnTop: true,
      nHorizAlign: app.constants.align.center, nHorizValue: 72, nVertAlign: app.constants.align.top, nVertValue: -42}); }; //

      var size = this.getPageBox("Media"); if ((size[0] == 0) & (size[1] == 263.9519958496094) & (size[2] == 612) & (size[3] == 0))
      { this.setPageBoxes({cBox: "Media",rBox: [-90,-174.0024,702,437.9976]}); this.setPageBoxes({cBox: "Crop",rBox: [-90,-174.0024,702,437.9976]}); trustedAddWatermark (this, false,
      "/Macintosh HD/Path/to/stationary/stationary4.pdf");
      this.addWatermarkFromText ({cText: global.user_response + " Published Ad", cFont: "Arial,Bold", nFontSize: 24, aColor: [ "G", 0.5 ], bOnTop: true,
      nHorizAlign: app.constants.align.center, nHorizValue: 72, nVertAlign: app.co