On a TextArea object, do I have control over how much vertical white space is taken between lines? I'd like to eliminate some of the white space that is being taken up.
Thank you,
-Scott
TextArea space between lines
Re: TextArea space between lines
Support · Jul 22, 2013Hello Scott,
Yes, you can control the spacing between the text lines within TextArea without any problem using our DynamicPDF Generator for .NET product. You will need to use the Leading property of the TextArea class to do this. Below is the sample code for it.
Document document = new Document();
Page page = new Page();
string text = "This is to test line leading";
for (int i = 0; i < 5; i++)
{
text += text;
}
TextArea area = new TextArea(text, 100, 100, 200, 200);
area.Leading = 10;
area.Height = area.GetRequiredHeight();
page.Elements.Add(area);
document.Pages.Add(page);
document.Draw(@"C:\Mydocument.pdf");
Thanks,
ceTe Software Support Team.