Hi,
Can anyone please explain how I can load a PDF or multi-page TIFF file in the GdViewer and then rotate all pages 90 degrees? I can make it loop through the pages and perform the rotation. But when it's done, only the first page is still rotated. When I scroll through the document, all pages are back in the original orientation. This function used to be easy in the Active-X version of GdPicture.
Any ideas or sample VB.Net code? Thanks!
Scott
Rotate All Pages
Re: Rotate All Pages
Hello,
That's pretty easy.
For PDF:
For tiff:
Let me know if you need further information.
Kind regards,
Loïc
That's pretty easy.
For PDF:
Code: Select all
Dim gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("c:\test.pdf", False) = GdPictureStatus.OK Then
gdpicturePDF.RotatePages(90)
GdViewer1.DisplayFromGdPicturePDF(gdpicturePDF)
End If
Code: Select all
Dim gdpictureImaging As New GdPictureImaging
Dim ImageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("c:\test.tif")
If ImageID <> 0 Then
For i As Integer = 1 To gdpictureImaging.TiffGetPageCount(ImageID)
gdpictureImaging.TiffSelectPage(ImageID, i)
gdpictureImaging.Rotate(ImageID, RotateFlipType.Rotate90FlipNone)
Next
gdpictureImaging.TiffSelectPage(ImageID, 1)
GdViewer1.DisplayFromGdPictureImage(ImageID)
End If
Let me know if you need further information.
Kind regards,
Loïc
Who is online
Users browsing this forum: No registered users and 2 guests