is now part of CreativePro.com!

Move Every Object on Every Page Toward or Away from Spine

16

A.L. wrote:

I have a document with many two page spreads. Not savvy enough about InDesign a few months ago, I did the two-page spreads without using the Master Page. Now I need to bring the objects on the spreads closer to the center by about an inch!

If you had to do this by hand, it would take a long time! Fortunately, there is a much faster way, using a script that you already have! It’s the AdjustLayout.jsx script, which lives in the Application samples folder, inside the Scripts folder:

Adjustlyaoutscript1

When you run this script (double-click on it), it opens a dialog box asking how far you want to move the objects on each page:

Adjustlayoutscript2

But here’s the tricky part? you know how your spouse always mixes up “left” and “right” when giving directions and it drives you crazy? This script seems to have trouble with “even” and “odd.” Worse, if you specify a Start Page and an End Page, it doesn’t work properly (it applies it to the wrong pages).

Fortunately, I happen to know a few scripters, including the inimitable Olav Martin Kvern. When Ole was at Adobe, he actually wrote most (probably all) of those sample scripts that ship with InDesign. He’s at Silicon Publishing now, but he graciously updated it for us. You can get the newer version here. (Hey, Adobe! Feel free to use this to update your old copy!)

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning (Lynda.com) are among the most watched InDesign training in the world.
You can find more about David at 63p.com

Follow on LinkedIn here
  • Bob Levine says:

    It’s amazing how overlooked these scripts are. I don’t do very much in the way of long documents anymore but stuff like this can cut hours or even days from big projects.

  • Glen Saville says:

    Awesome, everyday there is something else to pick up here, it should be on the InDesign Home Screen!

  • About time this script was fixed. Remember this one was always really handy but had to remember about all the conditions that came with it that David mentioned.

    Bravo Ole! (pardon the pun)

  • timothy p mcmahon says:

    You know what would be incredible is if this script could be modified to add a “copy” function (like on the various transform tools). A lot of times I have to set a multipage document two up for the printer to run on 11×17 and the only way I know how to do that is to go to 1 page at a time, select all and use the step & repeat tool. If this script had a “copy” utility I could do every page at once.

  • sara k. says:

    Bless you for this. As someone who already has trouble with left and right and negative and positive, I was sure this extension was gaslighting me. But now I see that I knew what was what and this generally good extension was nuts.

  • Boris Muller says:

    This script still hasn’t replaced the default, and I’m using the latest version of CC 2014.

    Thank you so much, this has saved me hours.

  • vanessa embrechts says:

    I used this modified script in a bigger script (added some actions before)
    Now it changes only the active page. Can I add a repeat to do this automatically for every page in an entire document? The (amount of) move stays the same for all pages.

    (very new at scripting, so bare with me)
    thanks
    Vanessa

  • Ed says:

    This looks really helpful, but I get the same error message using this script as I do using the standard InDesign sample:

    Javascript Error!

    Error number 45
    Object is invalid

    [Followed by various other categories]

    I’m running InDesign 5.5 on a Mac – OSX 10.9.5 – and have tried saving the script to the same folder as InDesign’s own script and to the folder where I keep my own scripts.

    Can anyone help?

    • Garisimo says:

      Hey Ed! I don’t know if you are still looking for a reason the script errors out, but I came across the same problem. When I looked at the script in a text editor, the line in question dealt with even/odd pages — my document was set up as page 1 being a left page (part of a longer publication) with the starting page number as 36… I changed, temporarily, the section numbering/page number (so that page 1 would be a right hand page). The script then worked as desired (no javascript error). Hope that helps! I’m not savvy enough to edit Javascript, but if someone could it would save some headache. Cheers!

  • Paul Marriner says:

    Great script! Just saved me a huge amount of time and agro moving more than a thousand images in a catalog style book (print repurposing to digital).

  • Vishal says:

    Hey, I am not able to run this code beyound page no. 44. It is showing me JavaScript Error 45. on Line no. 188 of this code.

    Please help.

  • Tom says:

    Hi, Im working on a big project at the moment,printing catalogs over 3000 pcs.
    First 1000 are done and we noticed that the pages are to close to the spine because the binding with 300 pages is kinda frustrating.

    Tried the standard script, didn’t work like it has to!
    Downloaded the new one, and take a guess… it worked! very happy here!

  • Aleksandar Popovski says:

    Hi, I would like to move specific text frames on every page (460 pages) from the footer to the top of the page to a specific “Y Location”. They are not created in the master pages but . All text frames have the same width and height if that helps. Any ideas? Thanks a lot!

    • David Blatner says:

      I do not script, but I just asked ChatGPT to write a script to do this for me… and it worked! Wow. You can download it here, and use a text editor to change the values. Note that you need to change your preferences so that document measurement system are set to to POINTS and the Origin setting is set to Page (not Spread) for this to work.

  • Shlomit Heymann says:

    What a beautiful Script! One can never know he needs it until he does… Thank you for that.

    One problem with the script: It knows only to do it on documents that starts with an odd page. If the the document will start with a different page number or with even page it will not work and will give this error “45” that others mentioned. I’m unable to use it when working on book file. It also couldn’t recognize the correct page that the document in the book started with. It count the pages from 1 no matter what is the page name even if i shows the correct number of the page selection part.

    Of course the solution is the do it outside the book file, making sure that the 1st page will be to the Right or to the Left in a Right-to-Left binding document. You can then add it to the book file.

    *I used in on InDesign 2023 and apart of this problem it worked fine and saved me a lot of work. My job was to place 1826 InDesign pages (divided into 6 documents) to a smaller format that has different margins. A Right-to-Left binding. I did it with a script (MultiPageImporter) that has no option to treat facing pages and was placing each page on the same place wether it was Right or Left pages. I then used this script (AdjustLayout_modified) to move all objects to the same position on my Left pages.

  • >