Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Move Every Object on Every Page Toward or Away from Spine

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

David Blatner

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

Latest posts by David Blatner (see all)

  • - November 30, -0001
Tags
Related Articles
Comments

13 Comments on “Move Every Object on Every Page Toward or Away from Spine

  1. 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.

  2. 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)

  3. 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.

  4. 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.

  5. 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

  6. 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?

    • 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!

  7. 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).

  8. 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.

  9. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *