Free Support Forum -

Html underline does not work when wrapping italic tag (u i .../i /u)

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);


section.IsLandscape = true;

section.Paragraphs.Add(CreateHtmlText("Underline tag first, italic second", SomeDefaultStyle));

section.Paragraphs.Add(CreateHtmlText("Italic tag first, Underline second", SomeDefaultStyle));


Does not work even if wrapped in a div... Underline tag first, italic second
", SomeDefaultStyle));

string filename = @"d:\TestHtmlUnderline.pdf";




private static Text CreateHtmlText(string html, TextInfo textInfo)


return new Text(html)


TextInfo = textInfo,

IsHtmlTagSupported = true,

UseTextInfoStyle = true,



private static TextInfo SomeDefaultStyle




return new TextInfo()


Alignment = AlignmentType.Left,

FontSize = 10,

FontName = "Arial"





Jean-Fran├žois Rouleau

Hi Jean-Fran├žois,

for using our products.<o:p></o:p>

have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-35234. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.