I did know that. The user is only viewing the document, not editing it. Sometimes when the document gets scanned, they miss a page or two that are the wrong orientation. They are viewing a read-only document in the viewer. As they read the document, they may rotate the page so they can read it. By reverting back, the user can get confused. I do not open it in edit mode because some of the multipage tiffs can get huge and it takes too long to open and it is a waste of resources to open it for editing.
I just wanted to make sure that this is by design before I write a work around for the action. I will have to remember all the page orientations and rotate any user rotated pages before displaying them back to the user. The reason I even brought this up is that the version 4 demo app opens the document the same way I do, using the same calls, but it remembers the orientation and does not revert back.
I am using Visual C++ with MFC for my project, but referencing your VB code as examples. The V4 project was from: .\GdViewer ActiveX\samples\vb\basic_viewer. In Form1.frm it showed the veiwer using the following code to open a multipage tiff document.
- Code: Select all
Private Sub Command1_Click()
Me.CommonDialog1.Filter = "All Files (*.*)|*.*|PDF (*.pdf)|*.pdf|JPEG (*.jpg)|*.jpg|Bitmap (*.bmp)|*.bmp|TIF (*.tif)|*.tif|Gif (*.gif)|*.gif |PNG (*.png)|*.png|Icon (*.ico)|*.ico|Windows Meta Files (*.wmf)|*.wmf"
Me.CommonDialog1.ShowOpen
If Len(Me.CommonDialog1.FileName) > 0 Then
Me.GdViewer1.CloseImage
Me.GdViewer1.DisplayFromFile (Me.CommonDialog1.FileName)
End If
End Sub
and to rotate the images in the viewer as:
- Code: Select all
Private Sub Command3_Click()
Me.GdViewer1.Rotate90
End Sub
Private Sub Command4_Click()
Me.GdViewer1.Rotate270
End Sub
This is the same way I am doing it now, except the V4 code does not revert the orientation, like the V5 code does.
I can remember the orientations and update it when the user goes to that page, the only issue I can see is if the user prints the document.
-Paul
Paul R. Rondeau
Sr. Software Engineer
MultiProcess Computer Corporation