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

Free Support Forum - aspose.com

Is it possible to add a hyperlink or bookmark to an image

I know that using document builder I can navigate to a node before the image and add a hyperlink.
But what I want is to add a hyperlink to an image.

Please have a look at the attached document to understand what I am saying.

Also, can a similar thing be done for bookmarks?



Thanks for your inquiry. You can achieve this by using the ShapeBase.HRef property; for example, please try run the following code snippet. This code inserts a click able (Hyperlinked) image in Word document:
DocumentBuilder builder = new DocumentBuilder();
Shape shape = builder.insertImage("C:\\Temp\\Aspose.Words.png");
Secondly, the actions that can be performed with bookmarks using Aspose.Words are the same as the ones you can perform using Microsoft Word. You can insert a new bookmark, delete, move to a bookmark, get or set a bookmark name, get or set text enclosed in it.

Please let me know if I can be of any further assistance.

Best regards,

Thanks, this helps.