How to: Rotate Pages

IMPORTANT

You need a license to the DevExpress Office File API or DevExpress Universal Subscription to use these examples in production code. Refer to the DevExpress Subscription page for pricing information.

This example rotates all document pages.

using DevExpress.Pdf;

//...

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    pdfDocumentProcessor.LoadDocument("..\\..\\docs\\TextRotate.pdf");
    int angle = 0;
    foreach (PdfPage page in pdfDocumentProcessor.Document.Pages)
    {
        angle = (angle + 90) % 360;
        page.Rotate = angle;
    }
    pdfDocumentProcessor.SaveDocument("..\\..\\docs\\Rotated.pdf");
}
See Also