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

Free Support Forum - aspose.com

Export Hyperlinks (Fields), Bookmarks in Word DOC to HTML Fixed File Format | C# .NET

Hi Aspose,

When converting the attached sample document(.docx),
there are some links which are not reflected in the converted html.
(These are “link1”, “link2”, “link5”, “link6”, “link7”, “internal_link2” in the document)
link_sample.zip (36.7 KB)

Is this scenario replicated ?
If so, could you fix this issue or give some information about this ?

@shun1985,

You are right; some hyperlinks (fields) do not work during converting this Word DOC document to HTML Fixed file format. We tested the scenario by using the following C# code of Aspose.Words for .NET API on our end:

Document doc = new Document("C:\\temp\\link_sample\\test_link01.doc");

HtmlFixedSaveOptions htmlFixedSaveOptions = new HtmlFixedSaveOptions();
htmlFixedSaveOptions.PrettyFormat = true;
htmlFixedSaveOptions.ExportEmbeddedCss = true;
htmlFixedSaveOptions.ExportEmbeddedFonts = true;

doc.Save("C:\\Temp\\link_sample\\21.3.html", htmlFixedSaveOptions);

We have logged this problem in our issue tracking system with ID WORDSNET-22058. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

@shun1985,

Regarding WORDSNET-22058, this does not seem to be a bug in Aspose.Words’ API. The shapes that draw borders around the links are placed “In front of text” and this prevents the links from receiving mouse click events in HTML. In other words, transparent shapes in MS Word are “transparent” for mouse clicks too, while in HTML they block the clicks. We suggest you to change wrapping of the shapes to “Behind text”. Meanwhile, we will try to find a way to work around the difference in behavior of transparent shapes; for example, we could try to place a transparent clickable div over the text of the link, above the shape. The div will emulate behavior of the link and will make users believe they click the link itself. We will keep you posted here on any further updates and let you know when WORDSNET-22058 will get resolved in future.

@awais.hafeez

I’m sorry for late reply and I’ve been on long holidays.
Thank you for close examination you have done.
And I confirmed that jumping to links are possible after setting these transparent shapes to “Behind Text”.
Please let me know about some workaround when you will have found it.

@shun1985,

I have logged these details in our issue tracking system and will keep you posted here on any further updates.