1 Reply Latest reply on May 7, 2014 5:39 AM by BEGINNER_X

    InDesign - batch of documents that need page resizing. need help ASAP

    robertdavy

      hi everybody,

       

      share your vast wisdom with me and help me with this please

       

      ive got about 450 documents that are currently at 160x160 pixels. they all need to be 180x180

       

      any scripts around to do this for me? rather than opening and closing 450 documents manually

       

      cheers!

        • 1. Re: InDesign - batch of documents that need page resizing. need help ASAP
          BEGINNER_X Level 3

          Hi Robert,

           

          Use the below code,

           

          var myFolder = Folder.selectDialog("Choose the Indesign Folder")
          
          var myFile = myFolder.getFiles("*.indd");
          
          if(myFile.length == 0)
          {
              alert("No Indesign Files in the Selected Folder")
              exit(0);
              }
          
          for(i=0; i<myFile.length; i++)
          {
              app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
             
              var myDoc = app.open(myFile[i]);
             
              myDoc.viewPreferences.horizontalMeasurementUnits = myDoc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.PIXELS; 
             
               app.activeDocument.documentPreferences.pageHeight = 180;
              
                app.activeDocument.documentPreferences.pageWidth = 180;
               
               app.activeDocument.save();
              
               app.activeDocument.close();
          
              }
          
          alert("Done")
          
          
          

           

           

          Have a happy day

          Siraj