Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Dec 19, 2023 11:47 am

Hi Team,

input = <ol>
<li>A</li>
<li>B</li>
</ol>
<ul>
<li>C</li>
<li>D</li>
<li>E</li>
</ul>

paragraph.appendHTML(input);

Above code I have written to add data ,But Bullet points and numbers are not coming, only data will be added in the document .Please check and let us know how to resolve this issue

Thanks in advance

pr20080798
 
Posts: 159
Joined: Wed Jan 20, 2021 1:15 pm

Wed Dec 20, 2023 2:07 am

Hello,

Thank you for your inquiry.
I have tested the code you provided using the latest commercial version of Spire.Office(Spire.Office for Java Version:8.11.3), but I was unable to reproduce the issue you mentioned. Attached below are my test code and the resulting files for your reference.
Code: Select all
String input = "<ol>\n" +
        "<li>A</li>\n" +
        "<li>B</li>\n" +
        "</ol>\n" +
        "<ul>\n" +
        "<li>C</li>\n" +
        "<li>D</li>\n" +
        "<li>E</li>\n" +
        "</ul>";
Document document = new Document();
Paragraph paragraph = document.addSection().addParagraph();
paragraph.appendHTML(input);
document.saveToFile("result.docx", FileFormat.Docx_2013);

Please review the code and files to ensure that everything is functioning as expected. If you have any further questions or encounter any issues, please don't hesitate to reach out to me. I'll be happy to assist you further.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc

cron