I tried to read the page orientation from a pdf-document with JavaScript in Adobe Acrobat.
To place a textfield
in the right position, I use the getpagerotation()
function to get the orientation of the document.
var rotation = this.getpagerotation(p);
(p
is a variable with the number of each page)
I tried this code with landscape and portrait orientation.
But the function always gives the 0
as the value of rotation which is wrong because the value of portrait rotation should be 90
instead of 0
.
What is wrong with the function?