C# TIFF Image Library
Reorder, Rearrange and Sort TIFF Document Pages in C#.NET Application


Use C#.NET Tiff Reading and Editing Control to Process & Manipulate TIFF File





C# TIFF Page Sorting Overview



RasterEdge XDoc.Tiff for .NET is powerful enough to enable C# users to reorder and rearrange multi-page Tiff file flexibly. Using this C#.NET Tiff image management library, you can easily change and move the position of any two or more Tiff file pages or make a totally new order for all Tiff pages.

RasterEdge .NET Tiff processing SDK also offers C# users with other fully developed Tiff imaging technologies, such as Tiff image viewing, creating, editing, converting, saving, etc. In the following part, you will see a complete C# programming sample for moving the position of Tiff document pages.



Sort TIFF File Pages Order Using C#



This part is mainly designed to show C# users how to easily implement Tiff document pages sorting. The sample Tiff image file will be rearranged with a new order.



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

// Sort the Tiff file pages with a new order (4, 3, 2, 1, 0).      
int[] pagePosition = new int[] { 4, 3, 2, 1, 0 };
doc.SortPage(pagePosition);
doc.Save(@"C:\sort.tif");


Swap TIFF Pages in C#.NET Application



This part is mainly designed to show C# users how to easily swap Tiff document pages. The sample Tiff image file pages will be rearranged with a new position.



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

//Swap the third and fifth pages.
doc.SwapTwoPages(2, 4);
doc.Save(@"C:\swap.tif");

public override void SortPage(int[] orderPageIdxs)

Description:
Sort the TIFF file pages with specified order;

Parameters:
public override void SwapTwoPages(int pageIdxF, int pageIdxB)

Description:
Swap two specified pages’ place

Parameters: