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.