Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Automatic rotation of odd pages
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Automatic rotation of odd pages

 Post Reply Post Reply
Author
basiluk View Drop Down
New Member
New Member


Joined: 17 May 2014
Points: 1
Post Options Post Options   Quote basiluk Quote  Post ReplyReply Direct Link To This Post Topic: Automatic rotation of odd pages
    Posted: 17 May 2014 at 12:05pm
Could some kind person please supply me with the necessary code that I can use in Acrobat Pro XI that will allow the automatic rotation of odd pages please?

I have a Lexmark scanner that will do duplex, but insists on inverting the odd pages !

Thanks in advance!
Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4111
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2014 at 4:56pm
You can run the following code from the JS console:
 
function RotatePages(nStart, nEnd, nRotate, nOddEven) {
/*
nStart =  starting page;
var nEnd = number of last page zero based page numbering;
var nRotate = The amount of rotation that should be applied to the target pages. Can be 0, 90, 180, or 270. The default is 0;
nOddEven =  0 - odd, 1 - even,  3 = all;
*/
var bRotate = true;
for(var i = nStart; i < nEnd; i++) {
if(nOddEven < 3) bRotate = (i % 2 == nOddEven); //test for odd or even page;
if(bRotate) {
// rotate i page only
setPageRotations({
nStart: i,
nEnd: i,
nRotate: nRotate
});
} // process bRotate;
} // end page loop;
return true;
} // end RotatePages function;
RotatePages(0, this.numPages -1, 180, 1); // rotate all even pages;
 
 
 


Edited by gkaiseril - 19 May 2014 at 5:13pm
Back to Top
Horndoggie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 15 Jul 2011
Location: USA
Points: 758
Post Options Post Options   Quote Horndoggie Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2014 at 5:09pm
I thought that running optimize scanned PDF would do this.  Am I confused?
Doug
Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4111
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2014 at 5:25pm
The scanner maybe scanning one page at a time and assembliing them expecting that the even page was rotated bu the poster did not rotate the page.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.016 seconds.