3 Replies Latest reply on Feb 23, 2015 4:32 PM by Zantcor

    Resize Eps image using Width

    Roopa ani Level 1

      Resize Eps image using Width in illustrator

        • 1. Re: Resize Eps image using Width
          Silly-V Adobe Community Professional

          It may take a lot of hard work, but it probably can be done.

          • 2. Re: Resize Eps image using Width
            Zantcor Level 1

            Something along these lines?

             

            var artWidth = artGroup.width;

            var artHeight =artGroup.height;          

             

                if (artWidth > artHeight)

                    {

                       var a = (288/artWidth)*100;

                       artGroup.resize(a,a);

                     }  

                if (artHeight > artWidth)    

                    {

                       var b = (162/artHeight)*100;

                       artGroup.resize(b,b);

                     }

             

            Easy way to make sure that the artwork fits into a defined box

            • 3. Re: Resize Eps image using Width
              Zantcor Level 1

              Can you please specify which width your wanting to use?  The width of the selected object, width of the artboard?  If its the width of the object then are you wanting to resize proportionally or just use the width as set datapoint such as

               

              for (j=0,j<12,j++);
              {
              if (objwidth == (25*j))
              {
                    var a = (j/artWidth)*100;
                        artGroup.resize(a,a);
                   var j = 12;
              
              
              }//end if
              }//end for
              

               

              This would take and divide the width of the artwork by J and resize both the height and width together against that number so J could be any size that your wanting as long as the width was equal to 25*j and increase by increments of 25 12 times or conditions are met.