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 bullet pointing some paragraphs like so:
- I am a letter:
- I am a number within a letter
- I am another number within a letter
- I am a number within a number within a letter
- I am another letter
The HTML for this particular section looks like this:
<ol type="A">
<li>I am a letter:
<ol type="1">
<li>i am a number within a letter</li>
<li>i am another number within a letter
<ol type="i">
<li>i am a number within a number within a letter</li>
</ol>
</li>
</ol>
</li>
<li>i am another letter</li>
</ol>
The output I am getting looks like this:
- I am a letter:
- i am a number within a letter
- i am another number within a letter
i. i am a number within a number within a letter
- i am another letter
This is not correct as point’s a. & b. should be 1. & 2. I have tried using both <ol type="1"> and <ol type="#">, but still no joy.
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.