XDoc.PDF
Features
Tech Specs
How-to C#
Pricing
How to Start Convert PDF Read PDF Build PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

C# PDF SDK Library
How to rotate PDF page orientations using XDoc.PDF for .NET library in C#, asp.net, winforms, azure


Empower C# Users to Change the Rotation Angle of PDF File Page Using C# Programming Language in .NET Application. Free Online Trial Download.










  • Best .NET PDF SDK supports PDF page rotation in Visual Studio .NET and C# programming language
  • Free .NET evaluation library for rotating PDF page in both .NET WinForms and ASP.NET application
  • Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint
  • Online C# class source codes enable the ability to rotate single specified page or entire pages permanently in PDF file in .NET framework project
  • Able to rotate page in PDF document to 90,180,270 degree in both clockwise and anticlockwise
  • Enable individual page or batch pages orientation changing without other PDF reader control
  • Support to overwrite PDF and save rotation changes to original PDF file
  • Easy to preview rotated PDF pages using our sample applications
  • Able to save to another PDF file after rotating PDF pages


C#.NET PDF page rotator library control, RasterEdge XDoc.PDF, is a 100% clean .NET solution for C# developers to permanently rotate PDF document page and save rotated PDF document back or as a new file. This PDF page rotating control toolkit automates the process of rotating individual PDF document page to desired degree angle using C# .NET code.


Using this C# .NET PDF rotate page control SDK, you can easily select any page from a multi-page PDF document file, rotate selected PDF page to special orientation and save rotated PDF file accordingly. Thus, this C# .NET PDF library can help developers achieve permanent PDF page rotation in any .NET class applications.


RasterEdge PDF page rotating SDK is, in essence, a multi-functional PDF page processing utility. Besides the functionality to rotate PDF document page, it is also featured with the functions to merge PDF files using C# .NET, add new PDF page, delete certain PDF page, reorder existing PDF pages and split PDF document in both Windows and ASP.NET web applications.


There are three rotation angles supported by XDoc.PDF, which include 90, 180, and 270 in clockwise. And C# users may choose to only rotate a single page of PDF file or all the pages. See C# programming demos below.






C# Rotate a PDF Page and save to a new pdf file


        #region rotate one page and save to a new pdf file
        internal static void rotateOnePageAndSaveToNewFile()
        {
            String inputFilePath = @"C:\1.pdf";
            String outputFilePath = @"C:\Output.pdf";

            // Specify the first page to be rotated.
            int pageIndex = 0;

            // Rotate 180 in clockwise.
            int rotateInDegree = 180;

            // Rotate the selected page.
            PDFDocument.RotatePage(inputFilePath, pageIndex, rotateInDegree, outputFilePath);
        }
        #endregion




C# Rotate a PDF Page and overwrite the original pdf file


        #region rotate all pages and save to a new pdf file
        internal static void rotateAllPageAndSaveToNewFile()
        {
            String inputFilePath = @"C:\1.pdf";
            String outputFilePath = @"C:\Output.pdf";

            // Rotate 180 in clockwise.
            int rotateInDegree = 180;

            // Rotate all PDF pages.
            PDFDocument.RotateAllPages(inputFilePath, rotateInDegree, outputFilePath);
        }
        #endregion




C# Rotate All PDF Pages and overwrite the original pdf file


        #region Rotate All PDF Pages and overwrite the original pdf file
        internal static void rotateAllPageAndOverwriteOriginalFile()
        {
            String inputFilePath = @"C:\1.pdf";

            // Rotate 90 in clockwise.
            int rotateInDegree = 180;

            // Rotate all PDF pages.
            PDFDocument.RotateAllPages(inputFilePath, rotateInDegree);
        }
        #endregion