This project has moved. For the latest updates, please go here.

<ol><li> problem while generating documents

Sep 30, 2011 at 9:50 AM


I'm loosing all the styles of Bullets when converting from HTML to paragraphs and writing to word document.

Here is my HTML

<div style="font-weight:bold;text-decoration:underline">Base:</div>
<ul><li>B<span style="color:#f41e1e"><strong>ullet1</strong></span></li>
<li style="text-decoration:underline"><span>Bullet2</span></li>
<li style="color:green"><span><strong>Bu</strong></span><span><span><strong>llet3</strong></span><strong>​</strong></span></li></ul>
<br /><div style="font-weight:bold;text-decoration:underline">Candidate:</div>
<p>dsf sdfsdxcv​</p>


and my code is as below.

             HtmlConverter converter = new HtmlConverter(mainDocPart);
                converter.ConsiderDivAsParagraph = true;

                var paragraphs = converter.Parse(html);
                for (int i = 0; i < paragraphs.Count; i++)

                    if (paragraphs[i] is WordExport.Table)
                        listTableCell5.Append(new Paragraph());


Please help me...

Thanks in Advance