Skip to main content
Inspiring
May 21, 2025
Question

pages in opposite order

  • May 21, 2025
  • 5 replies
  • 2378 views

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

5 replies

Robert at ID-Tasker
Legend
May 21, 2025
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?

 

Participating Frequently
September 13, 2025

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)

Peter Spier
Community Expert
Community Expert
September 13, 2025

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

Willi Adelberger
Community Expert
Community Expert
May 21, 2025

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

Peter Spier
Community Expert
Community Expert
May 21, 2025

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.

Inspiring
May 21, 2025
hmm, my document is already created though
Joel Cherney
Community Expert
Community Expert
May 21, 2025

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. 

rob day
Community Expert
Community Expert
May 21, 2025

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

 

 

 

 

 

Inspiring
May 21, 2025
can you write out the script for me please?
I'm having an issue opening it
rob day
Community Expert
Community Expert
May 21, 2025

/**
* 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');
BobLevine
Community Expert
Community Expert
May 21, 2025

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