I'm not really very experienced with image manipulation. Do you know how to access the multiple pages of the TIFF file? If so then printing multiple pages is simply a case of setting one property in the PrintPage event handler. Assuming that you can access a TIFF page by index it would look something like this:Note that that is almost certainly not valid code, but hopefully it illustrates the point.vb.net Code:
Private pageIndex As Integer = 0 Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _ ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 'Get the image to be printed. Dim imageToPrint As Image = myTiff.Pages(Me.pageIndex) 'Print the image here. 'Increment the page index. Me.pageIndex += 1 'There are no more pages to print if the index has gone beyond the upper bound. e.HasMorePages = (Me.pageIndex < myTiff.Pages.Count) If Not e.HasMorePages Then 'Reset the page index for the next run. Me.pageIndex = 0 End If End Sub
If you don't know how to get at each page of a TIFF then that's another issue, not really related to printing specifically.




Reply With Quote