Skip to main content

SetRotation

Sets page rotation angle

Syntax​

expression.SetRotation(angle);

expression - A variable that represents an ApiPage class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
angleRequiredDegreeThe rotation angle in degrees. Must be a multiple of 90.

Returns​

boolean

Example​

Rotate a page to a specific angle in a PDF.

// Useful for turning a page to face the right direction in a PDF.

// Apply a rotation transformation to change the page orientation in a PDF.

let doc = Api.GetDocument();
doc.AddPage(0);
let page = doc.GetPage(0);
page.SetRotation(90);