SaveAsPdf Issues

Discussions about document viewing.
Post Reply
sarzan
Posts: 25
Joined: Thu Jul 05, 2007 12:07 pm
Location: Florence - Italy

SaveAsPdf Issues

Post by sarzan » Wed Aug 29, 2007 12:59 pm

The following code alwaysresult in "ERROR" case.
Using other SaveAs method (like SaveAsJpeg, SaveAsBmp ecc.) always result in a DONE case.

Any suggestion ?

***********************************
Dim oGdPicture As GdpicturePro.cGdPicture
Dim Result As Boolean

Set oGdPicture = New cGdPicture
oGdPicture.LoadFromGdiDib (gdViewer1.GetNativeImage)

Result = oGdPicture.SaveAsPdf("d:\t\PDFTest.pdf")
If Result Then
MsgBox "DONE!"
Else
Msgbox "ERROR!"
End If

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Wed Aug 29, 2007 5:53 pm

Hi,

You are making confusion between a dib and a gdi+ image handle.

Please replace this line

Code: Select all

oGdPicture.LoadFromGdiDib (gdViewer1.GetNativeImage) 
by this one:

Code: Select all

oGdPicture.SetNativeImage(gdViewer1.GetNativeImage) 

It will works !

Regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests