Save a rotated TIFF page

Discussions about document viewing.
Post Reply
cmlayman
Posts: 3
Joined: Sat Apr 10, 2010 5:49 pm

Save a rotated TIFF page

Post by cmlayman » Sat Apr 10, 2010 6:00 pm

I am developing a form in MS Access that allows users to view incoming faxes and associate them with orders in our database. The faxes are mutipage TIFF files.

My issues is that when a user rotates a page that change to the image is not saved. Could someone please guide me on the proper way to save a rotated page?

Thanks,

Christina

Code that loads the image:

Code: Select all

Private Sub IncomingFaxesListBox_Click()
    
    Dim strPathAndFileName As String
    
    FaxViewer.CloseImage
    strPathAndFileName = "F:\" & Me.IncomingFaxesListBox.Column(0, Me.IncomingFaxesListBox.ItemsSelected(0))
    FaxViewer.CreateGdPictureImageFromFile strPathAndFileName
    FaxViewer.SetZoomFitControl
    ZoomLbl.Caption = (CLng(FaxViewer.Zoom * 100)) & " %"
    Me.LoadedFileTxt.Value = strPathAndFileName

    Call StoreNameCbo_AfterUpdate
    
End Sub

Code that rotates the page

Code: Select all

Private Sub Rotate90Btn_Click()
    FaxViewer.Rotate90
End Sub

cmlayman
Posts: 3
Joined: Sat Apr 10, 2010 5:49 pm

Re: Save a rotated TIFF page

Post by cmlayman » Sat Apr 10, 2010 6:11 pm

Sorry - posted a bit of old code. The code i'm using to load the file is:

Private Sub IncomingFaxesListBox_Click()

Dim strPathAndFileName As String

FaxViewer.CloseImage
strPathAndFileName = "F:\" & Me.IncomingFaxesListBox.Column(0, Me.IncomingFaxesListBox.ItemsSelected(0))
FaxViewer.DisplayFromFile (strPathAndFileName)
FaxViewer.SetZoomFitControl
ZoomLbl.Caption = (CLng(FaxViewer.Zoom * 100)) & " %"
Me.LoadedFileTxt.Value = strPathAndFileName

Call StoreNameCbo_AfterUpdate

End Sub

cmlayman
Posts: 3
Joined: Sat Apr 10, 2010 5:49 pm

Re: Save a rotated TIFF page

Post by cmlayman » Mon Apr 12, 2010 9:11 pm

Finally figured it out ... installed the GDPicture Pro and put an GdPicturePro5.Imaging ActiveX object on my form. Then I rotate and save with the following code:

Code: Select all

Private Sub FlipImageBtn_Click()
    Dim imageID As Long
    
    imageID = ImageViewer.TiffCreateMultiPageFromFile(Me.LoadedFileTxt.Value)
    Call ImageViewer.RotateAngle(180)
    
    If imageID <> 0 Then
        ImageViewer.SaveAsTIFF (Me.LoadedFileTxt.Value)
        ImageViewer.CloseImage (imageID)
    End If
End Sub
Hope this is helpful to someone.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests