Skip to content

Instantly share code, notes, and snippets.

@swasher
Created July 7, 2016 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swasher/f19780e0ead7e9708187c56b6cbe49b0 to your computer and use it in GitHub Desktop.
Save swasher/f19780e0ead7e9708187c56b6cbe49b0 to your computer and use it in GitHub Desktop.
Acrobat reverse page orders
// Put this into C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts
app.addMenuItem({ cName: "Reverse", cParent: "View", cExec: "PPReversePages();", cEnable: "event.rc = (event.target != null);", nPos: 0
});
function PPReversePages()
{
var t = app.thermometer;
t.duration = this.numPages;
t.begin();
for (i = this.numPages - 1; i >= 0; i--)
{
t.value = (i-this.numPages)*-1;
this.movePage(i);
t.text = 'Moving page ' + (i + 1);
}
t.end();
}// JavaScript Document
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment