XTextStyle ParaSpacing Property. The inter-paragraph spacing. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Read Only Description
[C#] double

[Visual Basic]
Double
0.0 No The inter-paragraph spacing.

 

   

Notes
 

Allows you to adjust the distance between paragraphs.

At the start of every new paragraph the text drawing position is shifted vertically by the distance specified in this property. If the value is positive this will space the paragraphs out. If the value is negative it will shift the paragraphs together.

 

   

Example
 

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.

[C#]
Doc theDoc = 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;
theDoc.Rect.Inset(20, 40);
theDoc.TextStyle.Size = 16;
theDoc.AddText(theText);
theDoc.Rect.Move(0, -350);
theDoc.TextStyle.ParaSpacing = 20;
theDoc.AddText(theText);
theDoc.Save(Server.MapPath("stylepspace.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = 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 + vbCrLf + theText + vbCrLf + theText + vbCrLf + theText
theDoc.Rect.Inset(20, 40)
theDoc.TextStyle.Size = 16
theDoc.AddText(theText)
theDoc.Rect.Move(0, -350)
theDoc.TextStyle.ParaSpacing = 20
theDoc.AddText(theText)
theDoc.Save(Server.MapPath("stylepspace.pdf"))
theDoc.Clear()


stylepspace.pdf