We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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


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;


Can you please tell me how to fix this?

Thanks in advance!


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.