4 Replies Latest reply on Jan 16, 2013 2:34 AM by Bill joy

    How to put a 'gap' between pages in a spread ?

    Bill joy Level 1

      I want to put a gap between pages in a spread

      I use reframe method to set gap but X position of  page not change. It is connected with first page.

      It reduce the width of first page not set gap between page.


      var myPages = myDocument.pages;

          //Make the page one inch wider and one inch higher.

          var myPage = myPages.item(1);

          var myBounds = myPage.bounds;

          var myY1 = myBounds[0];

          var myX1 = myBounds[1] + 30;

          var myY2 = myBounds[2];

          var myX2 = myBounds[3];

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


      How  put gap between page on a spreade ?



        • 1. Re: How to put a 'gap' between pages in a spread ?
          Jump_Over Level 5



          The question is what is the gap introduced for?

          I.e. if your goal is to include additional area for cover (to make it wider then content)

          I suggest to create a new masterPage (as wide as a gap suppose to be).

          So your spread could be built alike:

          masterPage A - masterPage GAP - masterPage B



          1 person found this helpful
          • 3. Re: How to put a 'gap' between pages in a spread ?
            Marc Autret Level 5

            Hi Bill,


            Maybe you could simply apply a translation to the pages—since ID CS5 and later supports page transformation.


            For example:



            // =====================================
            // NOTE: This won't work with facing-page docs
            // =====================================
            var X_GAP = 50, // in points
                CS_INNER = +CoordinateSpaces.INNER_COORDINATES;
            // Example with the 1st spread
            // ---
            var spd = app.activeDocument.spreads[0],
                pages = spd.pages.everyItem().getElements(),
                n = pages.length,
            for( i=1 ; i < n ; ++i )
                    CS_INNER,            // consider the inner bounding box
                    [0,0],                // arbitrary location (translation disregards origin)
                    [1,0,0,1,i*X_GAP,0]    // x-translation by i*X_GAP


            Not sure that answers your question.




            1 person found this helpful
            • 4. Re: How to put a 'gap' between pages in a spread ?
              Bill joy Level 1

              Thanks to All for reply

              I set gap between spread page using this :

              #target indesign

                var myDocument = app.documents.add();

                myDocument.documentPreferences.facingPages = false;

                myDocument.documentPreferences.allowPageShuffle = false;

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

                var pages= myDocument.pages.add();

                        var myY1 = 0;

                        var myX1 = 594.953;

                        var myY2 = 841.698;

                        var myX2 = 1190.44;

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


              If i do not set facingPages = false then it set next page just after first page and i was not able to set X coordinate of second page on first spread.


              Thanks to All.