Most of the time this works perfectly (all saved pages are saved perfectly). I do have one problem. When I use the a GdViewer that I drag to my vb.net form, and I use the GdViewer to edit like rotating the page 90 degrees, the last page of the Tiff file that edited doesn't keep those changes when I view the saved file.
I did notice that if I change the current page of the GdViewer before I save, I will notice that the changes are realized in the saved file, this is good. If I edit a page and try to save the GdPicture image to a file before I change the viewer to a different page, that last page I edited will not save the changes I made, but all the other pages are perfect, so just the last page edited is a problem, if I do not change the page in the viewer first.
I hope you can correct my error or give me a better practice using your SDK. I tried everything I could think of. The only way I could make sure the document would be saved the way the user would want was by using this code before the save:
Code: Select all
Dim int As Integer = oGdPictureImaging.TiffGetCurrentPage(m_ImageID)
'
' Force Page Change
'
If int = oGdPictureImaging.TiffGetPageCount(m_ImageID) Then
oGdPictureImaging.TiffSelectPage(m_ImageID, 1)
Else
oGdPictureImaging.TiffSelectPage(m_ImageID, oGdPictureImaging.TiffGetPageCount(m_ImageID))
End If
oGdPictureImaging.TiffSaveMultiPageToFile(m_ImageID, strFileName, TiffCompressionAUTO)
I can also reproduce the error without the GdViewer, but I think I'm making the same mistake either way. Thanks in advance for your response.
Thanks,
Lagwadam