Aspose.Words for Java : Issue to generate bullets

Hi,

We need to insert text containing unicode 0095 which represent a bullet.

As described in attached doc, instead of bullets we get a white space.

Is it possible ? Is it a limitation ? Do we need to change the unicode ?

thanks for your help

Hi Antonio,


Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input HTML document
  • Aspose.Words generated output document which shows the undesired behavior
  • Your expected document which shows the correct output. Please create this document using Microsoft Word application.
  • Share HTML string you’re passing to DocumentBuilder.write method
  • Please create a standalone Java application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click ‘Reply’ button that will bring you to the ‘reply page’ and there at the bottom you can include any attachments with that post by clicking the ‘Add/Update’ button.

Best regards,

Hi,


Please find attached the Aspose.word generated document and the expected document (the bullets appear correctly in the A, B, C, D list).
We do not have an HTML string in entry of DocumentBuilder but a litteral string getting from an xml file (see Generator.xml attached, data bmk=“Comment” tag).

Thanks for your help.
Hi Antonio,

Thanks for your inquiry. The problem occurs because no List is assigned to Paragraphs of "comment" Bookmark. Here is how you can assign List to those Paragraphs.
Document doc = new Document(getMyDir() + "Aspose_generated.docx");

Bookmark bm = doc.getRange().getBookmarks().get(“comment”);

Node currentNode = bm.getBookmarkStart();
boolean flag = true;
while (currentNode != null && flag)
{
if (currentNode.getNodeType() == NodeType.BOOKMARK_END)
flag = false;

Node nextNode <font color="BLUE">=</font> currentNode<font color="BLUE"><b>.</b></font>nextPreOrder<font color="BLUE"><b>(</b></font>currentNode<font color="BLUE"><b>.</b></font>getDocument<font color="BLUE"><b>(</b></font><font color="BLUE"><b>)</b></font><font color="BLUE"><b>)</b></font><font color="BLUE"><b>;</b></font>
<font color="RED"><b>if</b></font> <font color="BLUE"><b>(</b></font>nextNode<font color="BLUE"><b>.</b></font>getNodeType<font color="BLUE"><b>(</b></font><font color="BLUE"><b>)</b></font> <font color="BLUE">=</font><font color="BLUE">=</font> NodeType<font color="BLUE"><b>.</b></font>PARAGRAPH<font color="BLUE"><b>)</b></font>
<font color="BLUE"><b>{</b></font>
    <font color="BLUE"><b>(</b></font><font color="BLUE"><b>(</b></font>Paragraph<font color="BLUE"><b>)</b></font>nextNode<font color="BLUE"><b>)</b></font><font color="BLUE"><b>.</b></font>getListFormat<font color="BLUE"><b>(</b></font><font color="BLUE"><b>)</b></font><font color="BLUE"><b>.</b></font>setList<font color="BLUE"><b>(</b></font>doc<font color="BLUE"><b>.</b></font>getLists<font color="BLUE"><b>(</b></font><font color="BLUE"><b>)</b></font><font color="BLUE"><b>.</b></font>get<font color="BLUE"><b>(</b></font><font color="BROWN">0</font><font color="BLUE"><b>)</b></font><font color="BLUE"><b>)</b></font><font color="BLUE"><b>;</b></font>
<font color="BLUE"><b>}</b></font>

currentNode <font color="BLUE">=</font> nextNode<font color="BLUE"><b>;</b></font>

}

doc.save(getMyDir() + “15.6.0.docx”);

I hope, this helps.

Best regards,

Hi,


We will try that method.

Thanks