Wrong bulletpoints in word document inserted from html

Hi!
I have an issue regarding inserting html into word. Attached is the html file which is displayed in the generated word with bullet points but in the browser without.
I have used a trial version of the latest aspose.words for java.
Can you reproduce the issue and can you fix it?

Why is there generally a pre-processing of the html by aspose?

Hi Petra,


Thanks for your inquiry.I manage to reproduce this issue using the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.insertHtml(readFile(getMyDir() + “WrongBulletPoints.html”, Charset.forName(“UTF8”)));

doc.save(getMyDir() + “awjava-15.1.0.docx”);

But this is expected behavior as when you open this HTML with MS Word 2013 and save it to DOCX format for example, you’ll observe bullets in generated Word document (see attached msw-2013.docx). If we can help you with anything else, please feel free to ask.

Best regards,

Hi!

Thank you for your fast reply. I’m so sorry but I do not understand. There are no bullets in the html (right?) why should it be correct to see bullets in word?
I tried to open the html in MS Word 2010 and save it as docx as you say but I see also no bullets (see attached file).
The bullets are only created wrong when I try to copy and paste the text directly from my browser to word (but this shouldn’t be modeled).


Best regards

Hi Petra,

Thanks for your inquiry. Unfortunately, you cannot be 100% sure that HTML inserted into the document will look exactly as it looks in browsers. This is because Aspose.Words is originally designed to work with Word documents formats, like DOC, DOCX, WordML, RTF etc. HTML is not Word format and it is difficult and sometimes impossible to map between HTML and Word features. These formats are very different internally. Moreover, the document you attached in your previous post, when opened with different MS Word versions such as 2007, 2010 and 2013, they all display the bullets in TEST2.docx. Please refer to attached screenshots. If we can help you with anything else, please feel free to ask.

Best regards,