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:
NetDMS.exportDocumentImageWithAnnotations(_workflow, disn, "C:\JCEmailFld", "emailDocument" + currEmailDoc.ToString) Dim documentFile As Bitmap = Bitmap.FromStream(ImageIO.GetStream("C:\JCEmailFld\" + "emailDocument" + currEmailDoc.ToString + ".TIF")) Dim stampFile As Bitmap = Bitmap.FromStream(ImageIO.GetStream("\\server\Stamps\DClerkCertifiedCopy.gif")) For i As Integer = 235 To 255 stampFile.MakeTransparent(Color.FromArgb(i, i, i)) Next Dim docketGID As Guid = documentFile.FrameDimensionsList(0) Dim frameDimension As New Drawing.Imaging.FrameDimension(docketGID) documentFile.SelectActiveFrame(frameDimension, 0) Try Dim g As Graphics = Graphics.FromImage(CType(documentFile, Image)) g.DrawImage(CType(stampFile, Image).Clone(), CInt(stampFile.Width / 2), ((documentFile.Height - stampFile.Height) - CInt(stampFile.Height / 2)), stampFile.Width, stampFile.Height) g.Dispose() Catch ex As Exception MessageBox.Show("Error applying stamp: " + ex.Message) End Try documentFile.Save("C:\JCEmailFld\emailFinalDocument" + currEmailDoc.ToString + ".TIF", ImageFormat.Tiff) documentFile.Dispose() stampFile.Dispose()
Thanks,
Justin




Reply With Quote