This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/knowledge-base/how-do-i-rotate-a-page.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Rotate pages in JavaScript PDF viewer | Nutrient

To rotate a page in a document, use the DocumentOperation API. For example, if you want to rotate the first page of your document 90 degrees clockwise, use the following code:

// Rotate the first page of the document 90 degrees clockwise.
instance.applyOperations([
{
type: "rotatePages",
pageIndexes: [0],
rotateBy: 90
}
]);

This requires the Document Editor component.

This requires the Document Editor component.