Hi,
I am trying to load Html content with the LoadText option. It seems to ignore lists “
When using mailmerge with the html:fieldnames (as per your examples) they do work.
The code that I am trying:
// Code ommitted, but adding a new Paragraph to a section in a DocumentModel
section.Blocks.Add(doc.AddHtmlParagraph("Here the content with the lists that dont get rendered in the Word file"));
private static Paragraph AddHtmlParagraph(this DocumentModel doc, string content)
{
var style = (ParagraphStyle)doc.Styles.GetOrAdd(StyleTemplateType.Normal);
var p = new Paragraph(doc) { ParagraphFormat = { Style = style } };
p.Content.Start.LoadText(content, new HtmlLoadOptions
{
InheritCharacterFormat = true,
InheritParagraphFormat = true,
PreserveUnsupportedFeatures = true,
HtmlType= HtmlType.Html,
});
return p;
}
Any help would be appreciated. Due to the complex template the customer wants, using mailmerge would be a more difficult solution.
/Jeroen