How to: Rotate Pages
Important
You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use these examples in production code.
The code sample below 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