Loading...

SaveAsPdf Issues

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

SaveAsPdf Issues

Postby 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
sarzan
 
Posts: 25
Joined: Thu Jul 05, 2007 12:07 pm
Location: Florence - Italy

Postby 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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron