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

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


Use C# Code to Delete & Remove Pages from TIFF Document File




C# Image - Delete TIFF File Page Overview



RasterEdge.com offers an advanced multi-page Tiff editing utility, XDoc.Tiff for .NET, which allows C#.NET developers to accurately & quickly delete and remove any specified page or pages from Tiff document with mature and flexible Tiff page deleting API.


Related .net document control helps:
asp.net image viewer: ASP.NET Image Document Viewer Control: view, annotate, redact, convert image files in html web browser
asp.net edit pdf page: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net edit pdf text: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net convert pdf: ASP.NET Convert PDF Control: Convert, export PDF to Word, HTML, Tiff files in C# ASP.NET
asp.net create pdf: ASP.NET Create PDF Document Control: create, convert PDF file from Word, Excel, Tiff file formats in C# ASP.NET
asp.net pdf editor: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET


Users can apply our .NET Tiff imaging SDK to Tiff managing and processing in C#.NET, VB.NET, ASP.NET and .NET Windows Forms projects. Besides, other raster image file formats are also supported, like Gif, Png, Bmp, and Jpeg. For complete image formats information, please refer to: image formats in C#.NET.


If you want to see other Tiff page manipulating functions, please follow the links below respectively:


How to insert a Tiff page using C# code


How to rotate Tiff page using C# code


How to sort Tiff pages using C# code


How to extract Tiff page using C# code




C#.NET Demo for TIFF Page Deletion



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.


This part gives you a demo code for how to delete defined Tiff pages in C# project by using RasterEdge .NET Tiff processing SDK.




// Load a Tiff document.
            TIFFDocument doc = new TIFFDocument(@"C:\demo1.tif");
            if (null == doc) throw new Exception("Fail to load the file !");
            int[] pageIds = new int[] { 1, 3 };

            // Remove defined pages from the Tiff document. Note: page number is starting from 0. 
            doc.DeletePages(pageIds);
            doc.Save(@"C:\delete.tif");



public override void DeletePage(int pageIdx)

Description:
Delete the specified page from input TIFF file.

Parameters:
public void DeletePages(int[] deleteIds)

Description:
Delete TIFF pages from input TIFF file

Parameters:
public override void DeletePages(int fromPageId, int pageCount)

Description:
Delete specified TIFF pages form input TIFF file.

Parameters: