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

Free Support Forum - aspose.com

Anchor coming in html while converting from word

Dear Team,

Kindly assist for the issue that while trying to import the attached word document,

the anchors are generated in html

Attachment Details:

1.FINAL Rev Lovoy Guidance for Helicopter opertations- Prerit.docx (70.3 KB) (File used to import)
2.DMS Anchor #1.jpg (63.4 KB) (Please check in the attached image that the anchors generated)
3.DMS Anchor #2.jpg (68.2 KB) (Please check in the attached another image that the anchors generated from the word )

Using the below code to convert from word to Html
com.aspose.words.Document doc = new com.aspose.words.Document(datadir);
HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.HTML);
opts.setImageSavingCallback(new HandleImageSaving());
doc.save(datadir + “.html”, opts);

Kindly advise how to avoid generating the anchors while converting

Using the licensed version aspose-words-18.3

Many Thanks



What I understand is that Aspose.Words generated HTML shows one flag image (DMS Anchor #1.jpg) while MS Word generated HTML shows two flag images (DMS Anchor #2.jpg) on your end.

But, I have converted “FINAL Rev Lovoy Guidance for Helicopter opertations- Prerit.docx” word document to HTML format by using MS Word 2019 (using the Save As command) and Aspose.Words for Java 21.6 and do not see any flag images in either of them. I have attached the HTML files here for your reference:

Please upgrade to the latest (21.6) version of Aspose.Words for Java and see how it goes on your end? In case the problem still remains, then please compress the following resources into ZIP format and attach the .zip file here for testing:

  • Aspose.Words for Java 21.6 generated HTML file
  • MS Word 2019 generated HTML file showing the desired output
  • Please also create a standalone simplified Java Application (source code without compilation errors) that helps us to reproduce this issue on our end and attach it here for testing. Please do not include Aspose.Words JAR files in it to reduce the ZIP file size.

As soon as you get these pieces of information ready, we will then start further investigation into your issue and provide you more information.