For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rotate pages

Apryse SDK allows you to rotate pages within a document.

Rotating PDF pages in Android

You can rotate pages in a document using the UI component or programmatically with the Xamarin.Android API.

UI Component The rotate pages dialog allows you to rotate pages with a graphical interface in the document viewer.

API guide You can programmatically rotate pages in documents.

Rotating PDF pages in iOS

To rotate a page in a PDF document.

PDFDoc doc = new PDFDoc(filename);

// Rotate the first page 90 degrees clockwise.
Page page = doc.GetPage(1);
Page.Rotate originalRotation = page.GetRotation();
Page.Rotate rotation;
switch (originalRotation)
{
  case Page.Rotate.e_0:   rotation = Page.Rotate.e_90;  break;
  case Page.Rotate.e_90:  rotation = Page.Rotate.e_180; break;
  case Page.Rotate.e_180: rotation = Page.Rotate.e_270; break;
  case Page.Rotate.e_270: rotation = Page.Rotate.e_0;   break;
  default:                rotation = Page.Rotate.e_0;   break;
}
page.SetRotation(rotation);

About rotating pages

A page can be rotated clockwise, by 90 degrees, when displayed or printed. The Page.GetRotation() method returns the Page.Rotate enum specifying the current rotation. Similarly, Page.SetRotation() sets the current rotation.

Last updated

Was this helpful?