3 Replies Latest reply on Nov 3, 2016 8:46 AM by deguelleaux

    Script to rotate image inside a frame


      Hello,  reaching out before I fall completely down the rabbit hole. 


      I have a script that downloads puzzles and comics daily.  I have one puzzle that when downloaded, needs to be placed 90CCW.  A sample of the code i'm trying is here:


                      // LA TIMES SUNDAY
                      if (pageItem.label == "LA_TIMES_SUNDAY_CROSSWORD")
                          name = "20" + myDate.text + "pzsxw-a.tif"
                          var myFile = new File(imagePath+name);
        if (myFile.exists)
        pageItem.rotationAngle = 90;
        // pageItem.fit(FitOptions.CONTENT_TO_FRAME);


      This works but it moves my frame way up and resizes it.  Any ideas how I can only have the image rotate within the frame, keeping everything else in the template static?


      Hope this makes sense.