Skip to main content

SetRotation

Sets page rotation angle

Syntax

expression.SetRotation(angle);

expression - A variable that represents a ApiPage class.

Parameters

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

Returns

boolean

Example

Rotate a page to a specific angle in a PDF.

// How do I turn 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();
let page = doc.GetPage(0);
page.SetRotation(90);