Posted by a ceTe Software moderator
Hello,
You can set leading to specific lines using our DynamicPDF Generator for .NET product. You will need to use the FormattedTextArea page element and <line> tag to do this. You can set the Leading and LeadingType attributes of line tag. Below is the sample code for it.
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
FormattedTextAreaStyle style = new FormattedTextAreaStyle(FontFamily.Helvetica, 12, true);
string formattedText = "<p>Formatted text area provide rich formatting support for text that " +
"appears in the document. You have complete control over 8 paragraph properties: " +
"spacing before, spacing after, first line indentation, left indentation, right " +
"indentation, alignment, allowing orphan lines, and white space preservation; 6 " +
"font properties: <font face='Times'>font face, </font><font " +
"pointSize='6'>font size, </font><font color='FF0000'>color, " +
"</font><b>bold, </b><i>italic and </i><u>" +
"underline</u>; <line leading='8' leadingType='exactly'> and 2 line properties: leading, and leading type.</line> Text can " +
"also be rotated.</p>";
FormattedTextArea formattedTextArea = new FormattedTextArea(formattedText, 0, 0, 256, 400, style);
page.Elements.Add(formattedTextArea);
document.Draw(@"C:\MyDocument.pdf");
Thanks,
ceTe Software Support Team.