GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / TiffDeletePage Method
A unique image identifier of the GdPicture image representing the editable multipage TIFF image.
The page number of a page you want to delete. It must be a value from 1 to TiffGetPageCount.
Example





In This Topic
TiffDeletePage Method (GdPictureImaging)
In This Topic
Deletes a page specified by its page number in an editable multipage TIFF image, that is represented by its unique image identifier.

This method only handles editable multipage TIFF images; otherwise it will fail.

Syntax
'Declaration
 
Public Function TiffDeletePage( _
   ByVal EditableTiffID As Integer, _
   ByVal Page As Integer _
) As GdPictureStatus
public GdPictureStatus TiffDeletePage( 
   int EditableTiffID,
   int Page
)
public function TiffDeletePage( 
    EditableTiffID: Integer;
    Page: Integer
): GdPictureStatus; 
public function TiffDeletePage( 
   EditableTiffID : int,
   Page : int
) : GdPictureStatus;
public: GdPictureStatus TiffDeletePage( 
   int EditableTiffID,
   int Page
) 
public:
GdPictureStatus TiffDeletePage( 
   int EditableTiffID,
   int Page
) 

Parameters

EditableTiffID
A unique image identifier of the GdPicture image representing the editable multipage TIFF image.
Page
The page number of a page you want to delete. It must be a value from 1 to TiffGetPageCount.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK. We strongly recommend always checking this status first.
Remarks
Be aware that this method only handles an editable multipage TIFF images. You can use the TiffIsEditableMultiPage method to check if a required image is an editable multipage TIFF image.

Likewise, for saving the provided modifications you need to use the TiffSaveMultiPageToFile(Int32,String,TiffCompression) method.

This method requires the Image Documents component to run.

Example
Deleting the last page of a multipage tiff document.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // LoadInMemory parameter is set to true in order to be able to update the input file.
    int imageID = gdpictureImaging.TiffCreateMultiPageFromFile("multipage.tif", true);
    int pageCount = gdpictureImaging.TiffGetPageCount(imageID);
    gdpictureImaging.TiffDeletePage(imageID, pageCount);
    gdpictureImaging.TiffSaveMultiPageToFile(imageID, "multipage.tif", TiffCompression.TiffCompressionAUTO);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also