Click or drag to resize

getRotation Method

Gets a value representing the current absolute rotation of this page in degrees.

Syntax
JavaScript
function getRotation();

Parameters

None

Return Value

Type: Integer

Returns the rotation of this page in degrees

Remarks

The absolute rotation of a page is specified in a PDF file for each page. When a document is first opened, this value may or may not be 0 (depending upon the orientation specified in the original PDF). This method will only return 0, 90, 180, or 270.

Examples
JavaScript
  var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance
var myPage = myApi.getPageViewed();

//display the absolute rotation of this page
  window.alert(myPage.getRotation() + " degrees");
See Also

Other Resources