Setting Image name

Hi,

I am using Aspose Words for java.I am converting html to doc. I need to set name for a image present in my html img Element so that the image name can be seen in MSWord.What attribute i have to set in that img Element in my html

Please reply for the post

Hello
Thanks for your request, and sorry for delayed answer. There is no direct way to achieve this. The only way I can suggest you at the moment is post-processing your Document after converting.
Best regards,

Hi,
Thanks for your reply.What are the image attributes you will consider, when converting html to doc.

Hi
Thanks for your request. Currently, Aspose.Words reads only formatting attributes. Attributes like ‘id’ or ‘name’ used to specify name of image in HTML will be ignored upon importing HTML. However, as Andrey suggested, you can set shape name by post-processing the document. i.e. you should find a shape and the corresponding tag in your HTML, extract ‘id’ of this tag and set it as Shape.Name:
https://reference.aspose.com/words/net/aspose.words.drawing/shapebase/name/
Unfortunately, this is the only way you can achieve what you need.
Best regards,

Thanks for your reply.