How to C#: Tiff
Using Tiff SDK for C#.NET
Rotate a Tiff Page
Rotate a Tiff Page
  |  
Home ›› XDoc.Tiff ›› C# Tiff: Rotate Tiff Page

C# TIFF - Rotate TIFF File Page in C#.NET


How to Rotate TIFF File Page in C#.NET Imaging Application




C#.NET TIFF Rotating Overview



Our .NET Tiff Imaging Toolkit supports Tiff page's rotation in C# programming application. In general, you are able to rotate any page of Tiff document to 90, 180, and 270 degrees in clockwise. Apart from simple rotation feature, RasterEdge XDoc.Tiff for .NET still allows C# users to process and edit rotated Tiff page, like sorting and saving the rotated Tiff page in C#.NET application. RasterEdge .NET Tiff image library also supports other Tiff document page editing functions, such as Tiff page inserting, sorting, deleting, extracting and so on.


Related .net document control helps:
asp.net document viewer: EdgeDoc ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online using ASP.NET Web Con...
asp.net edit pdf text: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net dnn document viewer: DNN Document Viewer Control: view, annotate, redact, convert documents in dotnetnuke ASP.NET
asp.net mvc pdf editor: ASP.NET MVC PDF Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net excel document viewer: ASP.NET Excel Document Viewer in C# Control: view office excel files online in ASP.NET web applications
asp.net iis document viewer: C# HTML5 Viewer: Deployment on IIS
asp.net webforms document viewer: ASP.NET WebForms application document viewer control: view, annotate, redact, convert files online in ASP.NET




Rotate TIFF Page Using Sample C# Code



Add references;


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.XDoc.Processing.dll


  RasterEdge.Imaging.Raster.dll


  RasterEdge.Imaging.Raster.Core.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.TIFF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.TIFF;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:


If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.


If using x86, the platform target should be x86.


Using sample Visual C# code below, you can get the first page of loaded Tiff document and rotate it to 90 degrees in clockwise.




// Load a Tiff file.
            TIFFDocument doc = new TIFFDocument(@"C:\demo1.tif");
            if (null == doc)
                throw new Exception("Fail to load the file !");

            // Obtain the first page of Tiff file and rotate it to 90 degrees in clockwise.
            TIFFPage page = (TIFFPage)doc.GetPage(0);
            page.Rotate(RotateOder.Clockwise90);
            doc.Save(@"C:\rotate.tif");



public void Rotate(RotateOder order)

Description:
Rotate page 90 degree or flip the page.

Parameters: