2 Replies Latest reply on Jun 27, 2009 11:45 PM by yael876

    adding image

    yael876 Level 1

      Hi all,

      I want to add a picture and rotate it with script.

      I know the file path, the page and the coordiantes.

      I also know the rotation angle,

      Do you have an example how to do this with VBScript?

       

      Thanks

      Yael

        • 1. Re: adding image
          AdobeScripts Level 3

          you can try this:

           

          set myInDi = CreateObject("InDesign.Application")

          set myDoc = myInDi.ActiveDocument

          set myPage = myDoc.Pages.Item(1)

          set myRect = myPage.Rectangles.Add

          myRect.GeometricBounds = Array(0,0,100,100)

          call myRect.Place("C:\image.tif")

          call myRect.Fit(1667591779)

          ' 1667591779 = idFitOptions.idCenterContent

          myRect.RotationAngle = 90

           

          you need to change page number, GeometricBounds (y1,x1,y2,x2), path to image and rotation angle

           

          robin

           

          www.adobescripts.co.uk

          • 2. Re: adding image
            yael876 Level 1

            Hi Robert,

            Thanks it exactly what i want!

             

            Yael