Hello.
I'm new to DynamicPDF and I'm trying to set double line spacing in a label. Here's the code I'm using:
Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page(PageSize.A4, PageOrientation.Portrait, 54.0F)
Dim Text As String = "Very very very very very vey long text to show on two lines with double spacing. Very very very very very vey long text to show on two lines with double spacing. Very very very very very vey long text to show on two lines with double spacing."
Dim MyLabel As Label = New Label(Text, 0, 70, 504, 100, Font.Roman, 12, TextAlign.Left)
MyPage.Elements.Add(MyLabel)
How can I do to make double spacing between lines in that label?
Thank you in advance.
Alessio Vezza
line spacing
Re: line spacing
Support · Aug 7, 2006Hello Alessio,
There is no direct method to specify the spacing between the lines within the Label. But you can use escape sequence twice to enter a new line which will give you space between two lines. For this you must be aware of the position where to use the escape sequence. You can use vbCrlf to enter a line between two lines as shown below.
Dim Text As String = "Very very very very " & vbCrLf & vbCrLf & "very vey long text to show on two lines with double spacing." & vbCrLf & vbCrLf & "Very very very very very vey long text to show on two lines with double spacing. Very very very very very vey long text to show on two lines with double spacing."
You can also use FormattedTextArea in which also you can give the space between lines using the HTML tag <br><br>. In this case also you must be aware of the position where you want to add the new line.
Thanks,
ceTe Software Support Team
Re: line spacing
Forum member · Aug 7, 2006Thank you very much!
Alessio Vezza