2 Replies Latest reply on Sep 30, 2014 11:43 PM by BEGINNER_X

    Width Resize

    BEGINNER_X Level 3

      Hi All,

       

      Please help for my Very Urgent Request....

       

      I need to change the width of the image into 85 mm. I dont know why the below coding is not working for me

       

      Trying Code 1:

       

      app.activeDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.millimeters;

      app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.millimeters;

       

      parseInt(app.selection[0].geometricBounds[3] - app.selection[0].geometricBounds[1]) = 85;

       

       

      Trying code 2:

       

      var myGraphics = app.activeDocument.allGraphics;

      alert(myGraphics.length)

      for(i=0; i<myGraphics.length; i++)

      {

         app.select(myGraphics[i].parent);

          var myGBounds = myGraphics[i].parent.geometricBounds;

          myGraphics[i].parent.geometricBounds = [myGBounds[0], myGBounds[1], myGBounds[2], myGBounds[3]+20]

          }

       

       

      Input Screenshot: (Look at the Width)

       

      Screen Shot 2014-09-26 at 5.17.59 PM.png

       

      Output Screenshot: (Look at the width)

       

      Screen Shot 2014-09-26 at 5.18.49 PM.png

       

      Regards

      Siraj