1 Reply Latest reply on Mar 16, 2016 12:21 PM by Bernd Alheit

    Save File with Different Settings

    subieguy2 Level 1

      So I have PDF files that I continue to have to apply the same steps to. I am not really that great with programming. I have written 2 tools using the trustedSave MenuItem. I have 2 different tools created. I have commented in the steps I am not sure if are possible or not. I have the api book but again I am not a programmer....I stumble through the best I can

      // TO SAVE WEB FILE
      app.addMenuItem({
          cName: "trustedSave",
          cUser: "Save SIS File",
          cParent: "Tools",
          cExec: "saveSisFile();",
          nPos: 0
      });
      
      
      function saveSisFile() {
          app.beginPriv(); {
              // EMBED ALL PAGE THUMBNAILS
              // USING SMALLEST FILE SIZE FROM PDF OPTIMIZER
              this.saveAs("~/Desktop/" + this.documentFileName.substring(0, 11) + '_SIS.pdf');
          }
          app.endPriv();
      }
      
      
      // TO SAVE TILED FILE
      app.addMenuItem({
          cName: "trustedSave",
          cUser: "Save P File",
          cParent: "Tools",
          cExec: "savePFile();",
          nPos: 0
      });
      
      
      function savePFile() {
          app.beginPriv(); {
              // EMBED ALL PAGE THUMBNAILS
              // DELETE PAGE 1
              // PRINT - TILE LARGE PAGES - WITH 0.5" Overlap
              this.saveAs("~/Desktop/" + this.documentFileName.substring(0, 11) + '_P.pdf');
          }
          app.endPriv();
      }
      
      
      
      
      

      Acrobat 8 Pro, Windows 7 64 bit machine