(code in itextsharp but question is to both itext and itext sharp)
I tried to use
XMLWorkerHelper.GetInstance().ParseXHtml(mh, sr);
to convert a richtext field to PDF. But it failed in converting nested lists.
<ul>
<li>
test1
<ul>
<li>test1.1</li>
</ul>
</li>
<li>test2</li>
</ul>
is rendered as
- test1 test1.1
- test2
So I searched around and found this post
Then someone mention in the post above that nested list will not work for a ColumnText, which I need to use to fill text that can overflown to next page.
ct.AddElement(par);
int status = 0;
status = ct.Go();
if (ColumnText.HasMoreText(status))
{
// add new page and continue filling columntext
}
I guess my question is besides ColumnText, what else that I can use which renders nested lists well that can deal with overflown richtext PDF field
Edit: we are using itextsharp 5.5.10. not sure if it is fixed in itext 7