Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

pages in opposite order

Participant ,
May 21, 2025 May 21, 2025

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

TOPICS
How to
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 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=0ml8mq1smjfjqs3k9...

 

 

 

 

Screen Shot 28.png

 

Screen Shot 27.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 21, 2025 May 21, 2025
can you write out the script for me please?
I'm having an issue opening it
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 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');
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 21, 2025 May 21, 2025
i should put this whole thing in the script?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 May 21, 2025

Yes

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 May 21, 2025

Are you familiar with running scripts?

 

Has to be saved as plain text from a text editor with .jsx extension saved in:

‎⁨⁨Applications⁩ ▸ ⁨Adobe InDesign 20XX ▸ ⁨Scripts⁩ ▸ ⁨Scripts Panel⁩

 

Should then show in your Scripts panel. Double-click to run

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 22, 2025 May 22, 2025

where do I put in this script?

hendy_5450_0-1747917857555.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2025 May 22, 2025

@hendy_5450

 

At least on Windows - you can't upload scripts into Application samples - you need to put script into User samples folder.

 

The easiest way - open User scripts list, then on any script - right click and select Reveal in Explorer - Windows will open a new window with the folder - copy&paste your script there. 

 

Or: 

 

https://creativepro.com/how-to-install-scripts-in-indesign/ 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 22, 2025 May 22, 2025

In your InDesign application folder

 

Applications⁩ ▸ ⁨Adobe InDesign 20XX ▸ ⁨Scripts⁩ ▸ ⁨Scripts Panel⁩

 

Screen Shot 31.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 22, 2025 May 22, 2025
it's giving me an error
[image: image.png]
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2025 May 22, 2025
quote
it's giving me an error[image: image.png]
By @hendy_5450

 

You need to post through the website - replying to the email notification won't work. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2025 May 23, 2025

I'm having an issue opening it

 

Make sure you Download the script—right click ReverseNumbering.jsx and choose Download.

 

 

 

Screen Shot 36.png

 

 

 

If you cut and paste the code into a text application it has to be saved as plain text with .jsx extension—Rich Text will not work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 21, 2025 May 21, 2025
hmm, my document is already created though
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 22, 2025 May 22, 2025

I need the entire document to be reversed order - the last page to the first, and the first to the last.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2025 May 22, 2025
quote

I need the entire document to be reversed order - the last page to the first, and the first to the last.


By @hendy_5450

 

Will you then continue editing your document - or just for print / export? 

 

Reversing just pages won't make it RTL "correct". 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 22, 2025 May 22, 2025
correct, i just need the entire document reversed
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2025 May 22, 2025
quote
correct, i just need the entire document reversed
By @hendy_5450

 

And then what? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 22, 2025 May 22, 2025
quote

I need the entire document to be reversed order - the last page to the first, and the first to the last.


By @hendy_5450

You haven't explained WHY you need to do this...

There may be another way to get your desired result that is simpler.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2025 May 21, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 21, 2025 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?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2025 Sep 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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines