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

Free Support Forum - aspose.com

Bookmarks are bring converted into anchor tags

Hi Aspose team,
Hope you are doing fine!

I have a work document which contains Bookmarks (I have attached this document). When I am converting it to HTML, then it is generating anchor tags (below is the HTML conversion of attached document).

<a name="test2">This is a bookmark</a><a name="test"></a>

Is it possible that bookmarks are converted into div/p tags instead of anchor (a) tags? Thanks!


Hi Zeeshan,

Thanks for your inquiry. It would be great if you please share your expected output HTML. We will then provide you more information about your query along with code.

Thanks for quick response!

I am expecting the output as shown below. Thanks!

<p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri">This </span><span style="font-family:Calibri">is</span><span style="font-family:Calibri"> a bookmark</span></p>


Hi Zeeshan,

Thanks for sharing the detail. Please use following code example to get the desired output.

Document doc = new Document(MyDir + "Bookmark_test.docx");
doc.Save(MyDir + "17.5.html");