Click or drag to resize

deskewPage Method

Deskews (straightens) this page in the currently loaded document.

Syntax
JavaScript
function deskewPage(angle);

Parameters

angle

Type: Double

The angle (in degrees) to rotate this page.

Return Value

Type: Boolean

true if operation completed successfully; otherwise, false.

Remarks

A positive angle will rotate the page clockwise. A negative angle will rotate the page counterclockwise.

Pages are deskewed relative to their current state. For example, if you call deskewPage(1.0) twice, the page will be rotated 2.0 degrees.

Because page content is not rotated, the page should only be deskewed using a small angle. Pages can not be deskewed more than 45.0 degrees.

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

//deskew the page by 1 degree
  myApi.getPageViewed().deskewPage(1.0);
See Also

Other Resources