Free Support Forum - aspose.com

Render HR HTML Tag in PDF using Aspose.PDF for .NET in C#

Hello,

I need to add a horizontal rule to my PDF. My current code is not working and it is as follow:

Section sectionReportTitle = pdf1.Sections.Add();

sectionReportTitle.PageInfo.Margin.Left = 10;

Text txt = new Text("My XYZ report details:


");

txt.IsHtmlTagSupported = true;

txt.TextInfo.Alignment = AlignmentType.Left;

txt.TextInfo.FontName = "Courier New";

txt.TextInfo.FontSize = 12;

txt.TextInfo.IsTrueTypeFontBold = true;

sectionReportTitle.Paragraphs.Add(txt);

Can you please tell me how to fix this?

Thanks in advance!

The


tag is not supported in inline HTML. I have logged this issue as PDFNET-3865 and we will try to support it in the future version.