In this example we add two blocks of text to a document. The
first block uses the default paragraph spacing. The second block
uses a positive value to space out the paragraphs.
using (Doc doc = new Doc()) {
string theText = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter se differunt.";
theText = theText + "\r\n" + theText + "\r\n" + theText + "\r\n" + theText;
doc.Rect.Inset(20, 40);
doc.TextStyle.Size = 16;
doc.AddText(theText);
doc.Rect.Move(0, -350);
doc.TextStyle.ParaSpacing = 20;
doc.AddText(theText);
doc.Save(Server.MapPath("stylepspace.pdf"));
}
Using doc As New Doc()
Dim theText As String = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter se differunt."
theText = theText + vbCr & vbLf + theText + vbCr & vbLf + theText + vbCr & vbLf + theText
doc.Rect.Inset(20, 40)
doc.TextStyle.Size = 16
doc.AddText(theText)
doc.Rect.Move(0, -350)
doc.TextStyle.ParaSpacing = 20
doc.AddText(theText)
doc.Save(Server.MapPath("stylepspace.pdf"))
End Using