Free Support Forum - aspose.com

My company is considering to buy aspose.word and am trying it but i get some trouble with bookmarks when i convert documents from docx to html. the bookmark tags are there in the end document but they are empty! Is there a way to fix this? please help!

my company is considering to buy aspose.word and am trying it but i get some trouble with bookmarks when i convert documents from docx to html. the bookmark tags are there in the end document but they are empty! Is there a way to fix this? please help!
Hi Jessy,

Thanks for your inquiry. I have tested the scenario and have not found any issue with bookmarks while using latest version of Aspose.Words for .NET. Please use the latest version of Aspose.Words for .NET. If you still face problem, please share your document with us for investigation purposes.

Hi, thank you for the quick reply.

I have the newest verison of Aspose Words for .Net, but the problem remains.

I convert a docx file with a bookmark inside to a html file. When i examine the html file afterwards i discover that the “a” tag has the correct Name attribute, but it doesn’t contain any content. The content is inside the “span” tag, after the end “a” tag.

This is the result I get:
This is a bookmark

This is what i expected it to be:
This is a bookmark

Is this by design, in that case why? Or did I stumble upon something that needs to be corrected? Or is it something that I am doing wrong?

I attached the file

Regards
Jessy Kyalo Musyimi

Hi Jessy,


Thanks for your inquiry. I have worked with your document and have not found any Hyperlink { HYPERLINK \l “TestBookmark” }. I have added a Hyperlink at the end of document. Please find the modified document and output HTML file in attachment.

Please use following code snippet to inserts a hyperlink into a document using DocumentBuilder.

<span lang=“EN-GB” style=“font-size:10.0pt;font-family:“Courier New”;color:#2B91AF;mso-font-kerning:
0pt;mso-no-proof:yes”>Document<span lang=“EN-GB” style=“font-size:10.0pt;
font-family:“Courier New”;mso-font-kerning:0pt;mso-no-proof:yes”> doc = new Document();<o:p></o:p>

DocumentBuilder builder = new DocumentBuilder(doc);

builder.StartBookmark("Bookmark1");

builder.Write("Bookmarked text.");

builder.EndBookmark("Bookmark1");

builder.Writeln("Some other text");

// Specify font formatting for the hyperlink.

builder.Font.Color = Color.Blue;

builder.Font.Underline = Underline.Single;

// Insert hyperlink.

// Switch \o is used to provide hyperlink tip text.

builder.InsertHyperlink("Hyperlink Text", @"Bookmark1"" \o ""Hyperlink Tip", true);

// Clear hyperlink formatting.

builder.Font.ClearFormatting();

doc.Save(MyDir + "DocumentBuilder.InsertHyperlinkToLocalBookmark Out.doc");


Hi and again thanks for your quick reply.

I am sorry but i think i forgot to mention that we don’t add the bookmarks programmatically! The bookmarks are added manually in MS Word 2010 and then the document is converted to HTML using aspose.words for .NET.

We only use bookmarks but not hyperlinks because we would want to find them programmatically later in the application.

Regards,

Jessy Kyalo Musyimi

Hi Jessy,

Thanks for sharing the details. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-7165 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi,

Am just wondering how long it will take to fix this bug because my customer is waiting for an answer about this so that they can decide if they can use Aspose.Words or not!

Thanks and hope to hear from you guys soon.

Hi Jessy,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. Hopefully, the fix of your issue will be included in the next version of Aspose.Words (i.e. v11.10.0) which is planned to be released by the end of this month (November' 30, 2012). We will inform you via this forum thread as soon as the new release is published.

We appreciate your patience.

Hi Jessy,


Thanks for your inquiry.

The developer is currently working on your issue and it will hopefully be fixed before the next release at the end of the month. We will inform you of any developments.

Thanks,

The issues you have found earlier (filed as WORDSNET-7165) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Thanks so much. I have tested and it works!

Hi Jessy,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.