2 Replies Latest reply on Sep 20, 2016 1:06 PM by Mats Frøiland

    Resize/Scale Object Automaticly Indesign

    Mats Frøiland



      I have a 50x70 cm poster with a frame containing an object that is 18 cm height, centered in the frame.


      I want to create several posters with different height on the object.


      Is there any way to automaticly scale/resize the object proportionaly growing by 0,5 cm height, and export PDFs up for each new size, up to 60 cm?

        • 1. Re: Resize/Scale Object Automaticly Indesign
          Skemicle Level 3

          This probably isn't the best way to do it but this is one example of a way it can be done:


          var changeHeightBy = .5;
          var count = 0;
          while(height< 59.75){
              var sel = app.selection[0],
              gbs = sel.allGraphics[0].geometricBounds,
              width = gbs[3] - gbs[1],
              height = gbs[2] - gbs[0],
              props = width/height,
              changeWidth = (changeHeightBy * props) /2;
              changeHeight = changeHeightBy / 2
              sel.allGraphics[0].geometricBounds = [gbs[0] - changeHeight, gbs[1] - changeWidth, gbs[2] + changeHeight, gbs[3] + changeWidth];
              app.activeDocument.exportFile(ExportFormat.PDF_TYPE, File("/c/File(" + count + ").pdf"));
          • 2. Re: Resize/Scale Object Automaticly Indesign
            Mats Frøiland Level 1

            Hi. Thank you. It looks good.


            There are two graphic elements. Can I name one of them or put it in a layer to just resize the object I want to resize?