Skip to main content
Inspiring
May 21, 2025 5:30 PM UTC
Question

pages in opposite order

I need to get my document pages to go the opposit way.

For example the first page has to be the last, and vice versa

how can I do that??

38 replies

Robert at ID-Tasker
Legend
May 21, 2025 8:23 PM UTC
quote

I need to get my document pages to go the opposit way.

For example the first page has to be the last, and vice versa


By @hendy_5450

 

Why?

 

Translate
Participating Frequently
Sep 13, 2025 1:36 PM UTC

iam in a same scenario..  im doing a magazine (arabic)..  so the pages must be reversed. (arabic books start from the back, as opposed to english)

Translate
Peter Spier
Community Expert
Community Expert
Sep 13, 2025 2:26 PM UTC

@edward382075877wr1  You should be using the ME version of InDesign.

Translate
Willi Adelberger
Community Expert
Community Expert
May 21, 2025 7:41 PM UTC

Use a Midle East version. There you can change in document setup the binding from left to right.

Translate
Peter Spier
Community Expert
Community Expert
May 21, 2025 5:49 PM UTC

Or download the ME version of InDesign, which is designed to work with right-to left languages and has controls for story direction. Not sure if you can reverse an existing file with that, but I'd bet you could create a new one, set the binding direction to r-t-l and copy/paste your content.

Translate
Inspiring
May 21, 2025 6:05 PM UTC
hmm, my document is already created though
Translate
Joel Cherney
Community Expert
Community Expert
May 21, 2025 8:35 PM UTC

That's not really a problem if you need to reverse page order because you're working on something in Arabic or Hebrew. If that's the case, then using a version of InDesign that supports these writing systems is a no-brainer. I think that, no matter what you've done, we can walk you through getting it into a properly formatted RTL document.

 

But if you have some other reason to want to reverse page order, then getting one of these page-order-reversal scripts working is going to be your best bet. 

Translate
rob day
Community Expert
Community Expert
May 21, 2025 5:48 PM UTC

Hi @hendy_5450 , It also can be done via Numbering & Section Options If you have many pages the sections can be scripted. You can try this script —ReverseNumbering.jsx:

 

https://www.dropbox.com/scl/fo/gu2j9447mwhhp9o2ls22n/AJhrL9GYj365fnRip3awiXY?rlkey=0ml8mq1smjfjqs3k9ibvq3rq3&dl=0

 

 

 

 

 

Translate
Inspiring
May 21, 2025 6:14 PM UTC
can you write out the script for me please?
I'm having an issue opening it
Translate
Inspiring
May 21, 2025 6:40 PM UTC

/**
* Sets sections for reverse numbering 
* @ return Void 
*/

function reverseNumbers(){
    var d = app.activeDocument;
    var p = d.pages.everyItem().getElements();
    var ds = d.documentPreferences.allowPageShuffle
    d.documentPreferences.allowPageShuffle = false;
    
    //Clear any existing sections;
    var s = app.activeDocument.sections;
    if (s.length > 1) {
        s.itemByRange(1,s.length-1).remove();
    } 
    var pn;
    for (var i = 0; i < p.length; i++){
        pn = p.length - i;
        try {
            d.sections.add({continueNumbering:false, pageStart:p[i], pageNumberStart:pn})
        }catch(e) {}  
    };   
    d.documentPreferences.allowPageShuffle = ds;
}


app.doScript(reverseNumbers, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Reverse Numbers');

i should put this whole thing in the script?
Translate
BobLevine
Community Expert
Community Expert
May 21, 2025 5:40 PM UTC

How many pages do you have? If it's not that many, just do it manually. Otherwise, this could probably be easily scripted.

Translate