Can't justify bullet point text

Hi,
Project brief: We have an automated contract project that will generate a word document specific to a client. It involves generating a document from HTML specific to the client.
Problem: Part of the document involves having a text and bullet point text being justified like this:

The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

This the first point. This the first point. This the first point. This the first point. This the first point. This the first point. This the first point.

The HTML for this particular section looks like this:

<div align="justify">
    <br />
    The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
    lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps
    over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
    fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
    brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
    <br />
    <br />
    <ol type="i">
        <li>This the first point. This the first point. This the first point. This the first
            point. This the first point. This the first point. This the first point. </li>
    </ol>
</div>

The output I am getting is not completely justified. The paragraph that has “The quick brown fox jumps over the lazy dog” is justified, but the bullet point text is not. I have tried a number of combinations but have been unsuccessful. I expect all the text to be justified.

The code I’m using simply inserts the HTML and saves the document:

var document = new Document();
var builder = new DocumentBuilder(document);
builder.InsertHtml(html);
document.Save(targetFilePath, SaveFormat.Docx);

Can you please offer any help?
Thanks in advance.

Hi
Thanks for your request. The problem occurs because, currently, Aspose.Words does not support inheriting styles from parent elements.
Currently, Aspose.Words expects that font formatting is set in <span>, <i>, <b> or <u> element, formatting of paragraph – in <p> or <h1><h6> elements etc…

I linked your request to the appropriate issue, you will be notified as soon as it is resolved.
In your case your HTML should look like the following:

<div align="justify">
    <br />
    The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
    lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps
    over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
    fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
    brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
    <br />
    <br />
    <ol type="i">
        <li style="text-align:justify">
            This the first point.This the first point.This the first point.This the first
            point.This the first point.This the first point.This the first point.
        </li>
    </ol>
</div>

Best regards,

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

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