Rotate pages

Flip or rotate pages

The GroupDocs.Viewer enables you to rotate individual pages when rendering documents in HTML/PDF/JPG/PNG formats. To flip/rotate pages use the RotatePage method of ViewOptions class. The method accepts page number as the first parameter and rotation angle as the second parameter. There are three options that you can pass as the second parameter into RotatePage method:

The following code snippet shows how to rotate output pages when rendering a document as PDF (this example can be also found in our public repository. at GitHub)

using (Viewer viewer = new Viewer("sample.docx"))
    PdfViewOptions viewOptions = new PdfViewOptions();
    viewOptions.RotatePage(1, Rotation.On90Degree);