Click or drag to resize

rotatePage Method

Rotates this page (relative to the current rotation).

Syntax
JavaScript
function rotatePage(angle);

Parameters

angle

Type: Integer

The angle to which the current page should be rotated (relative to current orientation). This number should be a multiple of 90 (e.g. -90, 90, 180).

Return Value

Type: Boolean

true if operation completed successfully; otherwise, false.

Remarks

This method will return false if the angle is not a valid multiple of 90.

The angle parameter can be positive (rotate right / clockwise) or negative (rotate left / counter-clockwise).

This method sets a relative orientation meaning that if you call rotatePage(90) twice, the effective rotation will be 180 degrees.

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

//rotate the current page clockwise
myApi.getPageViewed().rotatePage(90);
See Also

Other Resources