We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert Picture - Size & Hyperlink

I have successfully created word to pdf , and inserted picture using

Dim shp As Aspose.Words.Drawing.Shape = builder.InsertImage(myimage)

However, the size of the inserted picture does not appear to be 100% of the original jpg picture, it seems to have streched it. How do i set the inserted picture to be 100% height and size ?
Also, i would like to assign a hyperlink to the inserted image. How would i go about this please ?
Many Thanks

Thanks for your inquiry. The image is inserted inline and at 100% scale. Please see the following link:
Also you can set negative values of width and height. See the following link.
Here is code that shows how to insert image with hyperlink.

'Create new document
Dim doc As Document = New Document()
'Create DocumentBuilder
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
'Insert Image into the document
Dim img As Shape = builder.InsertImage("test.jpg", -1, -1)
'Set hyperlink
img.HRef = "http://www.aspose.com"
'Save document

Hope this helps.
Best regards.

Thats great thanks !