1 Reply Latest reply on Jun 16, 2011 2:10 PM by Muppet Mark

    Multiple Page Size



      I have Microsoft Excel list of documents sizes.How can i create Multiple Page Size document using script?

      And can i give name pages instead of numbers?

        • 1. Re: Multiple Page Size
          Muppet Mark Level 5

          Well, I had a look at this and its all pretty new to me… I have had a problem trying to work out why it wants/works with 'points units' I've tried several permutations but can't seem to fix it… Maybe someone else knows…? All I did was try resize the pages… some appear to have a black edge in the GUI but I don't know what thats about? The dummy info should be straight forward to swap for read a CSV text file. As for naming I think not better to label…


          #target indesign
          var dummyInfo = [
          app.scriptPreferences.enableRedraw = true;
          //app.scriptPreferences.measurementUnit = MeasurementUnits.MILLIMETERS;
               = UserInteractionLevels.NEVER_INTERACT;
          var doc = app.documents.add();
          doc.documentPreferences.facingPages = false;
          doc.marginPreferences.top = 0;
          doc.marginPreferences.bottom = 0;
          doc.marginPreferences.left = 0;
          doc.marginPreferences.right = 0;
               = MeasurementUnits.MILLIMETERS;
               = MeasurementUnits.MILLIMETERS;
               = RulerOrigin.SPREAD_ORIGIN;
          // We will remove this whatever size it was
          var defaultPage = doc.spreads.firstItem().pages.firstItem();
          defaultPage.appliedMaster = NothingEnum.NOTHING;
          // Loop our new page info
          for ( var i = 0; i < dummyInfo.length; i++ ) {
               var newPage = doc.pages.add();
               newPage.label = dummyInfo[i][0];
               newPage.resize(CoordinateSpaces.SPREAD_COORDINATES, [0,0],
               [dummyInfo[i][1],dummyInfo[i][2]], false, true);


          Not sure if all of that is needed but resize was fussy about margins…