by Loïc » Fri Jan 23, 2009 11:41 am
Hi,
I tried it. No problem. I have a multipage tiff in b&w for all pages.
I give you the code I used:
- Code: Select all
Dim nPage As Long
Dim oImaging As Object, oGdViewer As Object
Set oImaging = CreateObject("gdpicturepro5.Imaging")
Set oGdViewer = CreateObject("gdpicturepro5.GdViewer")
oGdViewer.SetLicenseNumber ("XXX")
oImaging.SetLicenseNumber ("XXX")
oGdViewer.LockControl = True
oGdViewer.DisplayFromPdfFile ("c:\test.pdf")
For nPage = 1 To oGdViewer.PageCount
oGdViewer.DisplayFrame (nPage)
oImaging.SetNativeImage (oImaging.CreateClonedImage(oGdViewer.GetNativeImage))
oImaging.ConvertTo1Bpp
If nPage = 1 Then
Call oImaging.TiffSaveAsNativeMultiPage("c:\output.tif")
Else
Call oImaging.TiffAddToNativeMultiPage(oImaging.GetNativeImage)
oImaging.CloseNativeImage
End If
Next nPage
oImaging.TiffCloseNativeMultiPage
Hope this helps.
Loïc