# Rotate selected PDF pages

Rotate selected PDF pages by 90, 180, or 270 degrees, create a separate output document, and preserve the original browser-selected file.

Organize PDF pages

[Rotate pages in the browser](/browser/rotate-pages/) [Read the .NET guide](/docs/pdf/operations/)

Rotation summary

**Input**

PDF and page selection

**Output**

Rotated PDF

**Package**

[OfficeIMO.Pdf on NuGet](https://www.nuget.org/packages/OfficeIMO.Pdf)

**Runs on**

Browser-local WebAssembly or .NET

**Microsoft Office**

Not required

**License**

MIT

Browser rotation accepts 90, 180, or 270 degrees and a one-based page expression.

[Browse all PDF workflows](/pdf/)

Practical steps

## Rotate selected pages in a PDF copy

Resolve the selected pages, apply a supported clockwise rotation, and write a separate PDF.

1. **Select**Choose one PDF and enter pages such as 1,3-5,last.
2. **Rotate**Choose 90, 180, or 270 degrees.
3. **Download**Create the rotated PDF and review the resolved selector in the report.

Rotation updates the selected pages in a newly written document. It is intended for sideways scans, mixed-orientation packets, and deterministic publishing workflows.

## Rotate from .NET

```csharp
using OfficeIMO.Pdf;

PdfDocument source = PdfDocument.Load("scans.pdf");
PdfPageSelector pages = PdfPageSelector.Parse("1,3-5,last");
PdfDocument rotated = source.Pages.Rotate(90, pages);

File.WriteAllBytes("scans.rotated.pdf", rotated.ToBytes());
```

The browser report records the resolved selector, source and output page counts, and rotation angle. The source file is never overwritten.

## Rotation is not page reflow

This operation changes page orientation metadata and page-space presentation. It does not reinterpret text, crop content, deskew scanned images, or rebuild the document layout. Image deskewing and OCR require different processing contracts.

## API used on this page

- [`PdfDocument`](/api/pdf/officeimo-pdf-pdfdocument/)

<!-- PowerForge markdown artifact sha256:0841FE92F41B6737F86BE2A579D425CCCB553CE75B6F8043A290CDD34B3B79CE -->
