Skip to main content
Participating Frequently
April 7, 2023
Question

Action to rearrange pages within a PDF

  • April 7, 2023
  • 2 replies
  • 640 views

Hello. I'm looking for an Acrobat Action to rearrange pages within a PDF. For exampe, move page 4 beofre page 3.

 

Thank you.

This topic has been closed for replies.

2 replies

Participant
June 6, 2023

took awhile and some research but i managed to figure out how to do so in my PDF, should work with yours too with adjustment:

 

function Rearrange() {
var pos1=11; // pos# are the page position to move pages too
var pos2=14;
var pos3=17;
var pos4=32;
var pos5=35;
var pos6=38;
for (count = 0; count < this.numPages; count++) { // count is the page in PDF
if(count===18){this.movePage(count,pos1);}
if(count===19){this.movePage(count,pos2);}
if(count===20){this.movePage(count,pos3);}
if(count===39){this.movePage(count,pos4);}
if(count===40){this.movePage(count,pos5);}
if(count===41){this.movePage(count,pos6);}

}
}
Rearrange();

Participant
June 6, 2023

actions:custom commands: javascript

 

When set right you can use this command in a new Action

Participant
May 31, 2023

Looking for the same thing.