You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > Multipage TIFF Manipulation > TiffSelectPage Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.TiffSelectPage Method

Selects a page of a multipage tiff image. The page can now be edited or saved to a different file.

C#
public GdPictureStatus TiffSelectPage(
    int ImageID, 
    int Page
);
Visual Basic
Public Function TiffSelectPage(
    ByVal ImageID As Integer, 
    ByVal Page As Integer
) As GdPictureStatus
Parameters
Parameters 
Description 
ImageID 
GdPicture Image Identifier. The multipage tiff image. (Can be an editable multipage tiff or a read only tiff image.)  
Page 
Page no between 1 and page count.  
Returns

A member of the GdPictureStatus enumeration.

This function works with editable multipage tiff images and with multipage tiff images opened as read only.

Draw page number on each page of a multipage tiff image

Dim i As Integer
Dim TiffImageID As Integer
Dim PageCount As Integer
Dim oGdPictureImaging As New GdPictureImaging
 
oGdPictureImaging.SetLicenseNumber("XXX") 'Replace XXX by a valid demo or commercial license key
oGdPictureImaging.TiffOpenMultiPageForWrite(True)
TiffImageID = oGdPictureImaging.TiffCreateMultiPageFromFile("input.tif")
PageCount = oGdPictureImaging.TiffGetPageCount(TiffImageID)
 
For i = 1 To PageCount
    oGdPictureImaging.TiffSelectPage(TiffImageID, i)
    oGdPictureImaging.DrawText(TiffImageID, "Page " & CStr(i) & " / " & CStr(PageCount), 50, 50, 10, FontStyle.FontStyleRegular, Color.Black, "Arial", True)
    oGdPictureImaging.ConvertTo1Bpp(TiffImageID) 'Comment this line to keep true color image
Next i
 
 
oGdPictureImaging.TiffSaveMultiPageToFile(TiffImageID, "output.tif", TiffCompression.TiffCompressionAUTO)
oGdPictureImaging.ReleaseGdPictureImage(TiffImageID)
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.