Skip to content

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Rotate Pages ​

This example shows how to rotate pages:

javascript
// Rotate the first page 90 degrees clockwise.
const pagesToRotate = [1];
const rotation = instance.Core.PageRotation.E_90; // E_90, E_180, E_270: 90, 180, 270 degrees clockwise.
await documentViewer.getDocument().rotatePages(pagesToRotate, rotation);