Flip or rotate pages

The GroupDocs.Viewer enables you to rotate individual pages when viewing 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 viewing a document as PDF (this example can be also found in our public GitHub repository.)

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


More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.