Hi! The Html underline does not work with version 7.9.0 when it wraps the italic tag but it works when the italic tag wraps the underline tag. The sample code exposing the issue is below and I have attached a PDF file with the result.
public static void HtmlUnderlineDoesNotAppear()
{
Pdf pdf = new Pdf();
pdf.CompressionLevel = 6;
Section section = new Section(pdf);
pdf.Sections.Add(section);
section.IsLandscape = true;
section.Paragraphs.Add(CreateHtmlText("Underline tag first, italic second", SomeDefaultStyle));
section.Paragraphs.Add(CreateHtmlText("Italic tag first, Underline second", SomeDefaultStyle));
section.Paragraphs.Add(CreateHtmlText("
string filename = @"d:\TestHtmlUnderline.pdf";
pdf.Save(filename);
Process.Start(filename);
}
private static Text CreateHtmlText(string html, TextInfo textInfo)
{
return new Text(html)
{
TextInfo = textInfo,
IsHtmlTagSupported = true,
UseTextInfoStyle = true,
};
}
private static TextInfo SomeDefaultStyle
{
get
{
return new TextInfo()
{
Alignment = AlignmentType.Left,
FontSize = 10,
FontName = "Arial"
};
}
}
Thanks,
Jean-François Rouleau