1 Reply Latest reply on Feb 1, 2013 1:32 PM by Jump_Over

    Why coordinate change of first page on spread when reframe second page ?

    Bill joy

      Hi Experts

      I want to reframe spread pages.

      After reframe First page when I reframe the second page then it change the Y-axis of First page.

      How prevent to change the first page coordinate?

      I am using :

       

      var myDocument = app.activeDocument;

      with(myDocument.viewPreferences)

      {

          horizontalMeasurementUnits = MeasurementUnits.POINTS;

          verticalMeasurementUnits = MeasurementUnits.POINTS;

      }

      var myPage = myPages.lastItem();

      var myY1 = 0;

      var myX1 = 0;

      var myY2 = 647.648;

      var myX2 = 431.766;

      myPage.reframe(CoordinateSpaces.INNER_COORDINATES, [[myX1 , myY1], [myX2 ,myY2]]);

       

       

      myDocument.spreads.item(1).allowPageShuffle = false;   

      var page=myDocument.spreads.item(1).pages.lastItem();

      var pages= myDocument.pages.add(LocationOptions.AFTER,page);

      var myPage=myDocument.spreads.item(1).pages.lastItem();

      var myY1 = 0;

      var myX1 = 0;

      var myY2 = 647.648;

      var myX2 = 431.766;

      myPage.reframe(CoordinateSpaces.INNER_COORDINATES, [[myX1 , myY1], [myX2 ,myY2]]);

       

      While X1,Y1,X2,Y2 are same for both pages.

       

      Thanks;

        • 1. Re: Why coordinate change of first page on spread when reframe second page ?
          Jump_Over Level 5

          Hi,

           

          Not as an expert but as one who knows how it can hurt...

          Trying to find a logic here gave me just a headacke, so my solusion was to use page.resize() method (more options)

          In your case maybe:

           

          resize_arr = [widht, height];

          page.resize(

                              CoordinateSpaces.INNER_COORDINATES,

                              AnchorPoint.CENTER_ANCHOR,

                              ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,

                              resize_arr

                              );

           

          could help...?

          or something around this...?

           

          rgds