Ok what's happening is I'm pulling in a Tiff file that can have multiple pages. I selected the first frame, draw a stamp image to it and save it as a different file name.

When I do this, it is only saving the first page of the tiff file. How do I get all of the pages to save?

Here is my code:

vb Code:
  1. NetDMS.exportDocumentImageWithAnnotations(_workflow, disn, "C:\JCEmailFld", "emailDocument" + currEmailDoc.ToString)
  2.             Dim documentFile As Bitmap = Bitmap.FromStream(ImageIO.GetStream("C:\JCEmailFld\" + "emailDocument" + currEmailDoc.ToString + ".TIF"))
  3.             Dim stampFile As Bitmap = Bitmap.FromStream(ImageIO.GetStream("\\server\Stamps\DClerkCertifiedCopy.gif"))
  4.  
  5.             For i As Integer = 235 To 255
  6.                 stampFile.MakeTransparent(Color.FromArgb(i, i, i))
  7.             Next
  8.  
  9.             Dim docketGID As Guid = documentFile.FrameDimensionsList(0)
  10.             Dim frameDimension As New Drawing.Imaging.FrameDimension(docketGID)
  11.             documentFile.SelectActiveFrame(frameDimension, 0)
  12.  
  13.             Try
  14.                 Dim g As Graphics = Graphics.FromImage(CType(documentFile, Image))
  15.                 g.DrawImage(CType(stampFile, Image).Clone(), CInt(stampFile.Width / 2), ((documentFile.Height - stampFile.Height) - CInt(stampFile.Height / 2)), stampFile.Width, stampFile.Height)
  16.                 g.Dispose()
  17.             Catch ex As Exception
  18.                 MessageBox.Show("Error applying stamp: " + ex.Message)
  19.             End Try
  20.  
  21.             documentFile.Save("C:\JCEmailFld\emailFinalDocument" + currEmailDoc.ToString + ".TIF", ImageFormat.Tiff)
  22.  
  23.             documentFile.Dispose()
  24.             stampFile.Dispose()

Thanks,

Justin