I want to give dimension for my image in order to align this : i try this code .
Set MyImage1 = MyPage2.AddImage( Server.MapPath( "image/"&vimage1 ), -300, 50,0 )
MyImage1.Align = DPDF_Align_Center
MyImage1.Height= 600
MyImage1.Width= 600
MyImage1.SetDpi( 300 )
Set MyImage1 = MyPage2.AddImage( Server.MapPath( "image/"&vimage1 ), 0, 50,30 )
IMAGE
Re: IMAGE
Support · Mar 26, 2007Hello,
Are you getting any errors with the code you posted? What problem you are facing? What kind of behavior are you seeing?
Thanks,
ceTe Software Support Team.
Re: IMAGE
Forum member · Mar 26, 2007I have no code error, but i have not the good result (i put two set IMAGE1 so i have two images one out of margins and the principal has no good size for me,
I try to put width , height and alignment for my principal image.
I test to make them with this code, it's a better way to have good results , is it the best ?
Dim MyElementGroup
Set MyElementGroup = MyPage2.AddGroup()
AddImage MyElementGroup, 250, 300 'abscisse , ordonnees
Sub AddImage( MyElementGroup, x, y )
' Adds an image to the MyPageElements
'AddCaptionAndRectangle MyElementGroup, "Image Page Element:", x, y, 0, 0
Dim MyImage
Set MyImage = MyElementGroup.AddImage( Server.MapPath( "image/"&vimage1 ), x , y, 100 )
'Image is sized and centered in the rectangle
MyImage.SetBounds 500, 500
MyImage.VAlign = DPDF_VAlign_Center
MyImage.Align = DPDF_Align_Center
End Sub
Re: IMAGE
Support · Mar 26, 2007Hello,
Yes, you are adding the Image in a correct way and the properties you are using to centering the image are also correct.
Thanks,
ceTe Software Support Team.