In the following example we add three blocks of text to a
document. The first block uses the default line spacing. The second
block uses a positive value to space out the lines. The last block
uses a negative value to shift the lines together.
using (Doc doc = new Doc()) {
string theText = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani...";
doc.TextStyle.Size = 48;
doc.AddText(theText);
doc.Rect.Move(0, -250);
doc.TextStyle.LineSpacing = 20;
doc.AddText(theText);
doc.Rect.Move(0, -350);
doc.TextStyle.LineSpacing = -20;
doc.AddText(theText);
doc.Save(Server.MapPath("stylelspace.pdf"));
}
Using doc As New Doc()
Dim theText As String = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani..."
doc.TextStyle.Size = 48
doc.AddText(theText)
doc.Rect.Move(0, -250)
doc.TextStyle.LineSpacing = 20
doc.AddText(theText)
doc.Rect.Move(0, -350)
doc.TextStyle.LineSpacing = -20
doc.AddText(theText)
doc.Save(Server.MapPath("stylelspace.pdf"))
End Using