Hi everybody,
I have an issue with the output of HTML text in PDF documents. Once the HTML code includes a background-color style there's a linebreak before and after that part (see sample code).
The intended result is a single line without the linebreaks.
As-Is:
Normal test, and
deleted text
as well as
text with background colors
shouldn't have any linebreaks in it
Intended:
Normal test, and deleted text as well as text with background colors shouldn't have any linebreaks in it
publicvoid StyleAddedLineBreaks()
{
LicenseSetter.LicensePath = ConfigurationManager.AppSettings["Aspose.LicensePath"];
LicenseSetter.SetLicense();
Pdf pdf1 = newPdf();
Section sec1 = pdf1.Sections.Add();
Text desc;
desc = newText("Normal text, and <del style=\"background-color:#FFCC99;\">deleted text</del> as well as <ins style=\"background-color:#FFFF99;\">text with background colors</ins> shouldn't have any linebreaks in it");
desc.IsHtmlTagSupported = true;
sec1.Paragraphs.Add(desc);
// Save the resultant PDF document
pdf1.Save(@"C:/temp/StyleAddedLineBreaks.pdf");
}